Enum Class ThemeAudit.Metric

java.lang.Object
java.lang.Enum<ThemeAudit.Metric>
limn.themeeditor.ThemeAudit.Metric
All Implemented Interfaces:
Serializable, Comparable<ThemeAudit.Metric>, Constable
Enclosing class:
ThemeAudit

public static enum ThemeAudit.Metric extends Enum<ThemeAudit.Metric>
Which scale a finding was measured on, and how a number on it is written.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    How opaque one tone is, 0 to 100: a percentage rather than a fraction because a percentage is what a colour picker's alpha line reads, so the number in the finding is the number the author has to move.
    WCAG contrast ratio between two tones, 1 to 21.
    CIE L* difference between two tones, 0 to 100.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether this scale compares two tones, and so whether a finding on it names an ThemeAudit.Finding.against.
    How a number on this scale is written, appended to the number itself.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CONTRAST

      public static final ThemeAudit.Metric CONTRAST
      WCAG contrast ratio between two tones, 1 to 21.
    • LIGHTNESS_STEP

      public static final ThemeAudit.Metric LIGHTNESS_STEP
      CIE L* difference between two tones, 0 to 100.
    • ALPHA

      public static final ThemeAudit.Metric ALPHA
      How opaque one tone is, 0 to 100: a percentage rather than a fraction because a percentage is what a colour picker's alpha line reads, so the number in the finding is the number the author has to move.
  • Method Details

    • values

      public static ThemeAudit.Metric[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ThemeAudit.Metric valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isPairwise

      public boolean isPairwise()
      Whether this scale compares two tones, and so whether a finding on it names an ThemeAudit.Finding.against. Alpha does not: it belongs to a single tone.
    • unit

      public String unit()
      How a number on this scale is written, appended to the number itself.