This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Initialization Option Assess API

contrast

Define the active color scheme.

Note See the accessibility panel knowledge base article for more information on how to create and register a palette.

Values

Request object key configuration.contrast

This option can be initialized as one of the following types: object string.

  • Type object
    • active string

      Contains the name of a palette to use as the active palette. This name will be used to find the palette settings inside the custom_palettes.

    • custom_palettes array
      Define all the available custom palettes.
  • Type string

    A valid URL to a custom CSS file containing the accessibility palettes. This accessibility scheme will be loaded by default.

Type definitions

AccessibilityPalette object

  • name string
    A name that describes the palette.
  • colors object

    The colors object sets the colors of various elements in the assessment player. These attribute values can be defined as a string with either a hexadecimal color or RGB color code value.

    • button-background
    • button-background-highlight
    • button-background-highlight-hover
    • button-background-hover
    • button-color
    • button-color-highlight
    • content-background
    • content-background-correct
    • content-background-highlight
    • content-background-highlight-hover
    • content-background-incorrect
    • content-background-selected
    • content-border
    • content-border-correct
    • content-border-focus
    • content-border-incorrect
    • content-color
    • content-color-active
    • content-color-hover
    • content-color-link
    • content-color-link-hover
    • content-color-link-visited
    • content-color-neutral
    • content-color-subheading
    • content-color-toolbar
    • content-color-widget
    • progress-background
    • progress-color
    • well-background
    • well-background-toolbar
    • well-background-grayed
    • well-background-highlight
    • well-background-warning
    • well-color
    • well-color-grayed
    • well-color-highlight
    • well-color-toolbar
    • well-color-warning
    • widget-background
    • widget-background-active
    • widget-background-hover

AccessibilityPaletteColors object

  • button-background string
    Hex or RGB color code.
  • button-background-highlight string
    Hex or RGB color code.
  • button-background-highlight-hover string
    Hex or RGB color code.
  • button-background-hover string
    Hex or RGB color code.
  • button-color string
    Hex or RGB color code.
  • button-color-highlight string
    Hex or RGB color code.
  • content-background string
    Hex or RGB color code.
  • content-background-correct string
    Hex or RGB color code.
  • content-background-highlight string
    Hex or RGB color code.
  • content-background-highlight-hover string
    Hex or RGB color code.
  • content-background-incorrect string
    Hex or RGB color code.
  • content-background-selected string
    Hex or RGB color code.
  • content-border string
    Hex or RGB color code.
  • content-border-correct string
    Hex or RGB color code.
  • content-border-focus string
    Hex or RGB color code.
  • content-border-incorrect string
    Hex or RGB color code.
  • content-color string
    Hex or RGB color code.
  • content-color-active string
    Hex or RGB color code.
  • content-color-hover string
    Hex or RGB color code.
  • content-color-link string
    Hex or RGB color code.
  • content-color-link-hover string
    Hex or RGB color code.
  • content-color-link-visited string
    Hex or RGB color code.
  • content-color-neutral string
    Hex or RGB color code.
  • content-color-subheading string
    Hex or RGB color code.
  • content-color-toolbar string
    Hex or RGB color code.
  • content-color-widget string
    Hex or RGB color code.
  • progress-background string
    Hex or RGB color code.
  • progress-color string
    Hex or RGB color code.
  • well-background string
    Hex or RGB color code.
  • well-background-toolbar string
    Hex or RGB color code.
  • well-background-grayed string
    Hex or RGB color code.
  • well-background-highlight string
    Hex or RGB color code.
  • well-background-warning string
    Hex or RGB color code.
  • well-color string
    Hex or RGB color code.
  • well-color-grayed string
    Hex or RGB color code.
  • well-color-highlight string
    Hex or RGB color code.
  • well-color-toolbar string
    Hex or RGB color code.
  • well-color-warning string
    Hex or RGB color code.
  • widget-background string
    Hex or RGB color code.
  • widget-background-active string
    Hex or RGB color code.
  • widget-background-hover string
    Hex or RGB color code.
  • widget-background-toolbar string
    Hex or RGB color code.
Was this article helpful?