(alpha->pct a)Convert alpha (0-1) to strip percentage (0-100).
Convert alpha (0-1) to strip percentage (0-100).
(color-value-text h s l a)Produce a human-readable ARIA value text for the current colour.
Produce a human-readable ARIA value text for the current colour.
(derive-state {:keys [value alpha disabled readonly name mode open label
swatches]})Transform raw attribute values into a normalized state map.
Transform raw attribute values into a normalized state map.
(hsl->hsv h s l)Convert HSL to HSV. All inputs/outputs use H 0-360, S/L/V 0-100.
Convert HSL to HSV. All inputs/outputs use H 0-360, S/L/V 0-100.
(hsl->rgb h s l)Convert HSL to RGB. H is 0-360, S and L are 0-100. Returns {:r :g :b} with values 0-255.
Convert HSL to RGB. H is 0-360, S and L are 0-100.
Returns {:r :g :b} with values 0-255.(hsv->hsl h s v)Convert HSV to HSL. All inputs/outputs use H 0-360, S/V/L 0-100.
Convert HSV to HSL. All inputs/outputs use H 0-360, S/V/L 0-100.
(hue->pct h)Convert hue (0-360) to strip percentage (0-100).
Convert hue (0-360) to strip percentage (0-100).
(interactable? {:keys [disabled? readonly?]})Returns true when the element can accept user input.
Returns true when the element can accept user input.
(make-detail hex h s l a)Create an event detail map for the current colour state.
Create an event detail map for the current colour state.
(normalize-mode s)Normalize mode attribute to 'inline' or 'popover'.
Normalize mode attribute to 'inline' or 'popover'.
(normalize-value s)Parse and normalize a hex value string. Returns valid #rrggbb or default.
Parse and normalize a hex value string. Returns valid #rrggbb or default.
(parse-hex s)Parse hex string (#rgb, #rrggbb, #rrggbbaa) into {:r :g :b :a} or nil. r/g/b are 0-255, a is 0-1.
Parse hex string (#rgb, #rrggbb, #rrggbbaa) into {:r :g :b :a} or nil.
r/g/b are 0-255, a is 0-1.(parse-swatches s)Parse comma-separated hex colour strings. Returns vector of valid hex strings.
Parse comma-separated hex colour strings. Returns vector of valid hex strings.
(pct->alpha pct)Convert strip percentage (0-100) to alpha (0-1).
Convert strip percentage (0-100) to alpha (0-1).
(pct->hue pct)Convert strip percentage (0-100) to hue (0-360).
Convert strip percentage (0-100) to hue (0-360).
(rgb->hex r g b)Convert RGB (0-255) to #rrggbb hex string.
Convert RGB (0-255) to #rrggbb hex string.
(rgb->hsl r g b)Convert RGB (0-255) to HSL. Returns {:h 0-360 :s 0-100 :l 0-100}.
Convert RGB (0-255) to HSL. Returns {:h 0-360 :s 0-100 :l 0-100}.
(rgba->hex8 r g b a)Convert RGBA to #rrggbbaa hex string. Alpha is 0-1.
Convert RGBA to #rrggbbaa hex string. Alpha is 0-1.
(sat-val->xy-pct sat val)Convert HSV saturation (0-100) and value (0-100) to area thumb percentage positions {:x 0-100 :y 0-100}. x = saturation (left=0, right=100) y = inverted value (top=0 means V=100, bottom=100 means V=0).
Convert HSV saturation (0-100) and value (0-100) to area thumb
percentage positions {:x 0-100 :y 0-100}.
x = saturation (left=0, right=100)
y = inverted value (top=0 means V=100, bottom=100 means V=0).(valid-hex? s)Returns true when s is a valid hex colour string.
Returns true when s is a valid hex colour string.
(xy-pct->sat-val x-pct y-pct)Convert area thumb percentage positions to HSV saturation and value. Returns {:sat 0-100 :val 0-100}.
Convert area thumb percentage positions to HSV saturation and value.
Returns {:sat 0-100 :val 0-100}.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |