-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove support for hsv
, hwb
, ansi
and css keyword colors and add .rgbToAnsi256()
, .hexToRgb()
and .hexToAnsi256()
#65
Conversation
Signed-off-by: Richie Bendall <[email protected]>
Let's confirm the gameplan before merging this, but this looks like an OK start. I will have some requests about the API though since this is going to be a breaking change anyway - namely that we probably shouldn't follow the |
The PR title should reflect the user-facing changes, not an internal implementation detail. |
What do you have in mind? |
color-convert
hsv
, hwb
, ansi
and css keyword colours
Co-authored-by: Sindre Sorhus <[email protected]>
Co-authored-by: Sindre Sorhus <[email protected]>
Signed-off-by: Richie Bendall <[email protected]>
…si-styles into remove-color-convert
Signed-off-by: Richie Bendall <[email protected]>
In tight loops the double object lookup could add overhead. We could get away with simpler conversion functions at the flat level, e.g. Also, we don't need |
👍🏻 |
Signed-off-by: Richie Bendall <[email protected]>
hsv
, hwb
, ansi
and css keyword colourshsv
, hwb
, ansi
and css keyword colours and add top-level color conversion functions
hsv
, hwb
, ansi
and css keyword colours and add top-level color conversion functionshsv
, hwb
, ansi
and css keyword colours, accept an array for ansi16m()
and add top-level color conversion functions
hsv
, hwb
, ansi
and css keyword colours, accept an array for ansi16m()
and add top-level color conversion functionshsv
, hwb
, ansi
and css keyword colours, only accept an array for ansi16m()
and add top-level color conversion functions
hsv
, hwb
, ansi
and css keyword colours, only accept an array for ansi16m()
and add top-level color conversion functionshsv
, hwb
, ansi
and css keyword colours, only accept an array for ansi16m()
and add .rgbToAnsi256()
, .hexToRgb()
and .hexToAnsi256()
We should drop support for Node.js 8 because it doesn't support named regex capture groups. |
Signed-off-by: Richie Bendall <[email protected]>
Sure; node 8 is EOL so that's fine. |
Co-authored-by: Sindre Sorhus <[email protected]>
Signed-off-by: Richie Bendall <[email protected]>
Signed-off-by: Richie Bendall <[email protected]>
hsv
, hwb
, ansi
and css keyword colours, only accept an array for ansi16m()
and add .rgbToAnsi256()
, .hexToRgb()
and .hexToAnsi256()
hsv
, hwb
, ansi
and css keyword colours and add .rgbToAnsi256()
, .hexToRgb()
and .hexToAnsi256()
Signed-off-by: Richie Bendall <[email protected]>
Signed-off-by: Richie Bendall <[email protected]>
The build is now failing because tsd uses Typescript 3.9 whereas labelled tuple elements were added in Typescript 4.0. |
That's ok. A new |
hsv
, hwb
, ansi
and css keyword colours and add .rgbToAnsi256()
, .hexToRgb()
and .hexToAnsi256()
hsv
, hwb
, ansi
and css keyword colors and add .rgbToAnsi256()
, .hexToRgb()
and .hexToAnsi256()
Thanks for working on this 🙌🏻 |
Remove
color-convert
in favour ofrgb
,hex
andansi256
formats and add.rgbToAnsi256()
,.hexToRgb()
and.hexToAnsi256()
.Related to chalk/chalk#300