addAccessibilityPalettes - Methods - Assess API

Assess API Methods

addAccessibilityPalettes()

Add a custom color scheme to the accessibility panel color scheme list.

Requires show_accessibility with show_colourscheme to be set in the Assess API initialization object.

Requires test:ready status before being used. This can be accomplished by either listening to the test:ready event using the on() public method, or using the app readyListener.

At least one valid color replacement needs to be included to be a valid color scheme.

Examples

assessApp.addAccessibilityPalettes([
    {
        "name": "Blue Paper",
        "colors": {
            "content-background'": "rgb(123, 123, 123)",
            "content-color": "#371B33",
            "content-color-hover'": "#52284C",
            "button-background-hover": "#BCDCD8",
            "button-background": "#52284C",
            "button-background-highlight": "#7B3D72",
            "buttonbackground-highlight-hover": "#A45198",
            "button-color": "#E4F1EF",
            "button-color-highlight": "#F2F8F7",
            "content-color-subheading": "#52284C",
            "progress-color": "#52284C",
            "content-border": "#52284C",
            "widget-background": "#AFD5D0",
            "widget-background-toolbar": "#AFD5D0"
        }
    }
]);

Arguments

  • palettes array

    An array of objects containing accessibility color palette data.

Return value

None (undefined).

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

Related articles

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.