-
Notifications
You must be signed in to change notification settings - Fork 229
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(examples): make examples use v2 #389
Conversation
This introduces a helper type `LightDark` that takes a boolean to determine which `Color(light, dark)` to choose from. The `adaptive` package is a helper package that uses the `lipgloss.LightDark` along with querying the terminal when the module is imported to choose the appropriate light-dark color. Example: ```go var ( light = "#0000ff" dark = "#ff0000" ) colorToUse := adaptive.Color(light, dark) // the terminal is queried before choosing the color fmt.Println(colorToUse) ```
I also had to update log @ |
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Co-authored with @aymanbagabas
83606ac
to
d724ce6
Compare
Rebased on |
@bashbunni so the work here has been merged into #397, which contains solutions we're working though for adaptive colors, printers, and additional fixes for the open items here that were (excellently) documented. In other words, for all intended and purposes, it’s the leading v2 branch right ow. Are you cool if I open a PR for that branch and supersede this one? |
@meowgorithm yeah totally cool! If we don't need this branch anymore we can close it |
Goal: get the examples working for v2
Only thing outstanding is clarifying how to work with light and dark backgrounds + detecting background color with v2. On that note, #359 is related to this PR