Skip to content

do0dle-colors v2.0.0

Latest
Compare
Choose a tag to compare
@do0dleman do0dleman released this 28 Oct 07:45
· 18 commits to master since this release

Changes

  • Changed under the hood model to OkLCh and added corresponding methods:
    const color = new Color([.54, .34, 121])
    color.getOkLChArray() // [.54, .34, 121]
    color.getCssOklch() // 'oklch(54% 34% 121)'
  • Added new corresponding constructor options for OkLCh:
    new Color([0.56, 0.12, 240], 'OkLCh')
    new Color('oklch(74% .63 210)') 
  • Changed default color type to 'OkLCh' when using an array in Color constructor:
  • Reworked map functions (mapChroma and mapLightness). Now, at least one property of OkLCh color remains constant, and another property is being changed by a random constant step so that they are evenly spaced from one another.