Skip to main content

HTMLColorTintElement

HTML element for color tint pickers, functioning as some kind of 2D <input type='range'> input for selecting the color's saturation and brightness.

Hierarchy

  • HTMLElement
    • HTMLColorTintElement

Index

Constructors

constructor

Properties

defaultValue

defaultValue: string

Sets or retrieves the initial contents of the object.

See HTMLInputElement.defaultValue

internals_

internals_: ElementInternals = null

staticformAssociated

formAssociated: boolean = true

staticobservedAttributes

observedAttributes: string[] = ...

Accessors

brightness

  • get brightness(): number
  • set brightness(value: number): void
  • Get or set the color brightness on a scale of 0 to 255.


    Returns number

  • Parameters

    • value: number

    Returns void

disabled

  • get disabled(): boolean
  • set disabled(value: boolean): void
  • See HTMLInputElement.disabled


    Returns boolean

  • Parameters

    • value: boolean

    Returns void

hue

  • get hue(): number
  • set hue(value: number): void
  • Get or set the color hue on a scale of 0 to 360.


    Returns number

  • Parameters

    • value: number

    Returns void

name

  • get name(): string
  • set name(value: string): void
  • Sets or retrieves the name of the object.

    See HTMLInputElement.name


    Returns string

  • Parameters

    • value: string

    Returns void

saturation

  • get saturation(): number
  • set saturation(value: number): void
  • Get or set the color saturation on a scale of 0 to 255.


    Returns number

  • Parameters

    • value: number

    Returns void

validationMessage

  • get validationMessage(): string
  • Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.

    See HTMLInputElement.validationMessage


    Returns string

validity

  • get validity(): ValidityState
  • Returns a ValidityState object that represents the validity states of an element.

    See HTMLInputElement.validity


    Returns ValidityState

value

  • get value(): string
  • set value(value: string): void
  • Sets or retrieves the initial contents of the object.

    See HTMLInputElement.value


    Returns string

  • Parameters

    • value: string

    Returns void

valueAsHSV

  • Get or set the color value via an object with HSV color values. All HSV values are expected to be normalized to the [0, 1] range.


    Returns HSVColor

  • Parameters

    Returns void

Methods

attributeChangedCallback

  • attributeChangedCallback(name: string, oldValue: string, newValue: string): void
  • Parameters

    • name: string
    • oldValue: string
    • newValue: string

    Returns void

connectedCallback

  • connectedCallback(): void
  • Returns void

removeAttribute

  • removeAttribute(qualifiedName: string): void
  • Parameters

    • qualifiedName: string

    Returns void

reportValidity

  • reportValidity(): boolean
  • See HTMLInputElement.reportValidity


    Returns boolean

setAttribute

  • setAttribute(qualifiedName: string, value: any): void
  • Parameters

    • qualifiedName: string
    • value: any

    Returns void