Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

1.4.1

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 10 Jul 14:40
· 3 commits to default since this release
418b561

What's Changed

Added

  • Implemented Palette.Nearest method, which returns the nearest colour in a
    palette to a given colour.
  • Implemented LAB.Lerp method, which returns a colour between two colours in
    the LAB colour space.
  • Missing TypeScript types for new methods and Hex.fromHexRGBA.
  • CI workflow to ensure code is formatted and linted correctly.

Fixed

  • Due to a typo, the APCA.GetContrastRatio method was throwing an error when
    attempting to calculate the contrast ratio for certain colours.

Changed

All deprecated methods will output warnings to the console when used for the
first time. This is to help users migrate to the new methods.

  • This project's toolchain is now managed by aftman. Use of foreman is not recommended.
  • All instances of the word "colour" have been changed to "color" to match the
    US spelling and keep consistency with the Roblox API.
  • ColorUtils.Emphasise and ColorUtils.GetContrastingColour are now marked as
    deprecated for the same reason as above.
  • ColorUtils.GetContrastingColor is now marked as deprecated. The WCAG
    submodule should be used instead, since both APCA and WCAG provide two
    different methods for calculating contrast ratio.
  • ColorUtils.GetContrastRatio is now marked as deprecated and implements a
    compatibility layer. Previously this was a redirect to WCAG.GetContrastRatio
    but now it will use APCA.GetContrastRatio because it is more accurate. WCAG
    values (0-21) will be returned for backwards compatibility until the method is
    removed in a future release.
  • Palette.Tailwind will now produce a darker 950 shade, in line with
    Tailwind v3.3.2. Note that the
    generated palette will be slightly different to tailwind's, since the algorithm
    used to generate the palette is different.

Full Changelog: 1.3.1...1.4.1