Skip to content
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

(v2) fix: restore lipgloss.Color behavior #441

Merged
merged 1 commit into from
Nov 19, 2024
Merged

(v2) fix: restore lipgloss.Color behavior #441

merged 1 commit into from
Nov 19, 2024

Conversation

aymanbagabas
Copy link
Member

The new behavior of lipgloss.Color taking any type is ambiguous and can lead to unexpected results. This commit restores the original behavior of lipgloss.Color taking a hex string or an int string, and returning a color.Color.

To use a 4-bit color, use lipgloss.Red, lipgloss.Blue, etc. To use a 16-bit color, use lipgloss.ANSIColor. To use a 24-bit color, use lipgloss.Color, lipgloss.RGBColor, or any other color.Color value.

Fixes: #437

@aymanbagabas aymanbagabas added this to the v2.0.0 milestone Nov 18, 2024
@aymanbagabas aymanbagabas changed the title fix: restore lipgloss.Color behavior (v2) fix: restore lipgloss.Color behavior Nov 18, 2024
The new behavior of `lipgloss.Color` taking `any` type is ambiguous and
can lead to unexpected results. This commit restores the original
behavior of `lipgloss.Color` taking a hex string or an int string, and
returning a color.Color.

To use a 4-bit color, use `lipgloss.Red`, `lipgloss.Blue`, etc. To use
a 16-bit color, use `lipgloss.ANSIColor`. To use a 24-bit color, use
`lipgloss.Color`, `lipgloss.RGBColor`, or any other `color.Color` value.
@aymanbagabas aymanbagabas merged commit 6bbc36c into v2-exp Nov 19, 2024
18 of 19 checks passed
@aymanbagabas aymanbagabas deleted the v2-colors branch November 19, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants