EuCaue / foot

Soho vibes for foot terminal.
8 stars 3 forks source link

Provide a set of bright color variants #7

Open d2718nis opened 1 week ago

d2718nis commented 1 week ago

The issue

In the current themes, most bright color variants are set to match the base colors. This limits the use of all 16 colors in the terminal color scheme, making it difficult to add accents or visual emphasis. screenshot-2024-10-30-19-22-39

Context

While the official Rose Pine palette provides only base colors, there’s potential to modify these by adjusting brightness and saturation. Since this palette leans toward muted tones, the following could be applied:

The original specification only had 8 colors, and just gave them names. The SGR parameters 30–37 selected the foreground color, while 40–47 selected the background. Quite a few terminals implemented "bold" (SGR code 1) as a brighter color rather than a different font, thus providing 8 additional foreground colors. ANSI Escape Code

Example

I didn't decide on the final result of how much should each of the bright variants add to its brightness and saturation to have a noticeable difference but at the same time maintain the overall theme aesthetics. Here's an example of how it could look for the main rose-pine theme: screenshot-2024-10-30-19-44-01

Slightly brighter option screenshot-2024-10-30-22-25-04

Dependencies

I'm waiting for #6 to be merged to create a pull request for this feature.

d2718nis commented 1 week ago

I was skimming through the other themes and man 5 foot.ini to check for any additional missing colors, and there’s at least one:

[color]
flash=7f7f00

This only activates when the following option is enabled (default is no):

[bell]
visual=yes

It could still be useful to assign a value for it. Since the default uses a yellowish tone, setting it to something like Gold seems like it would fit well.

Other color values are configurable, but most already draw from the existing palette (regular1..7), like:

[color]
selection-foreground=
selection-background=
jump-labels=
scrollback-indicator=
search-box-no-match=
search-box-match=
urls=

For dim0..7, foot has an internal algorithm to derive these from regular0..7:

By default, foot implements this by reducing the luminance of the current color. This is a generic approach that applies to both colors from the 256-color palette, as well as 24-bit RGB colors.

d2718nis commented 1 week ago

I feel like this could be the end result

Rose Pine screenshot-2024-11-01-02-57-10

bright0=3b3750      # bright black (lighter Overlay)
bright1=f48fa6      # bright red (lighter Love)
bright2=b6e2eb      # bright green (lighter Foam)
bright3=ffd89a      # bright yellow (lighter Gold)
bright4=4b93b0      # bright blue (lighter Pine)
bright5=d7b7f4      # bright magenta (lighter Iris)
bright6=ffcecc      # bright cyan (lighter Rose)
bright7=f5f4ff      # bright white (lighter Text)

Rose Pine Moon screenshot-2024-11-01-02-57-20

bright0=52486a      # bright black (lighter Overlay)
bright1=f48fa6      # bright red (lighter Love)
bright2=b6e2eb      # bright green (lighter Foam)
bright3=ffd89a      # bright yellow (lighter Gold)
bright4=5aa8cd      # bright blue (lighter Pine)
bright5=d7b7f4      # bright magenta (lighter Iris)
bright6=ffb1af      # bright cyan (lighter Rose)
bright7=f5f4ff      # bright white (lighter Text)

Rose Pine Dawn screenshot-2024-11-01-02-57-32

bright0=f7f1eb      # bright black (lighter Overlay)
bright1=c97c8d      # bright red (lighter Love)
bright2=6bafbb      # bright green (lighter Foam)
bright3=ffb65e      # bright yellow (lighter Gold)
bright4=3a9bb0      # bright blue (lighter Pine)
bright5=a690c0      # bright magenta (lighter Iris)
bright6=ec9d99      # bright cyan (lighter Rose)
bright7=726f8c      # bright white (lighter Text)

I also noticed that the Pine color is assigned an incorrect value for the -dawn theme variant, it should actually be slightly darker.

EuCaue commented 1 week ago

I was skimming through the other themes and man 5 foot.ini to check for any additional missing colors, and there’s at least one:

[color]
flash=7f7f00

This only activates when the following option is enabled (default is no):

[bell]
visual=yes

It could still be useful to assign a value for it. Since the default uses a yellowish tone, setting it to something like Gold seems like it would fit well.

Other color values are configurable, but most already draw from the existing palette (regular1..7), like:

[color]
selection-foreground=
selection-background=
jump-labels=
scrollback-indicator=
search-box-no-match=
search-box-match=
urls=

For dim0..7, foot has an internal algorithm to derive these from regular0..7:

By default, foot implements this by reducing the luminance of the current color. This is a generic approach that applies to both colors from the 256-color palette, as well as 24-bit RGB colors.

I didn’t know flash= was a color option, since I’ve never used the flash feature, so it’s great to have it on the radar now! =)

I think foot should handle most of the other colors well on its own!

EuCaue commented 1 week ago

I feel like this could be the end result

Rose Pine screenshot-2024-11-01-02-57-10

bright0=3b3750      # bright black (lighter Overlay)
bright1=f48fa6      # bright red (lighter Love)
bright2=b6e2eb      # bright green (lighter Foam)
bright3=ffd89a      # bright yellow (lighter Gold)
bright4=4b93b0      # bright blue (lighter Pine)
bright5=d7b7f4      # bright magenta (lighter Iris)
bright6=ffcecc      # bright cyan (lighter Rose)
bright7=f5f4ff      # bright white (lighter Text)

Rose Pine Moon screenshot-2024-11-01-02-57-20

bright0=52486a      # bright black (lighter Overlay)
bright1=f48fa6      # bright red (lighter Love)
bright2=b6e2eb      # bright green (lighter Foam)
bright3=ffd89a      # bright yellow (lighter Gold)
bright4=5aa8cd      # bright blue (lighter Pine)
bright5=d7b7f4      # bright magenta (lighter Iris)
bright6=ffb1af      # bright cyan (lighter Rose)
bright7=f5f4ff      # bright white (lighter Text)

Rose Pine Dawn screenshot-2024-11-01-02-57-32

bright0=f7f1eb      # bright black (lighter Overlay)
bright1=c97c8d      # bright red (lighter Love)
bright2=6bafbb      # bright green (lighter Foam)
bright3=ffb65e      # bright yellow (lighter Gold)
bright4=3a9bb0      # bright blue (lighter Pine)
bright5=a690c0      # bright magenta (lighter Iris)
bright6=ec9d99      # bright cyan (lighter Rose)
bright7=726f8c      # bright white (lighter Text)

I also noticed that the Pine color is assigned an incorrect value for the -dawn theme variant, it should actually be slightly darker.

Yes, this is a great result, I like the "lighter" variants! =D

But just to confirm, these won’t replace the main themes, right? They’ll be something like rose-pine-main-lighter ?

EuCaue commented 1 week ago

I also noticed that the Pine color is assigned an incorrect value for the -dawn theme variant, it should actually be slightly darker.

Thanks for pointing that out! I’ll fix it! =)

d2718nis commented 1 week ago

But just to confirm, these won’t replace the main themes, right?

Correct, these new colors are simply bright options for the existing regular colors, so they won’t replace or alter the main colors in the theme. They’ll just add an additional set of bright variants, as specified in the ANSI standard.

By default, the foot terminal doesn’t use these bright variants directly (bold-text-in-bright is set to no by default; see the foot manual). Historically, they were used as a "bold" variant to add emphasis, though most modern terminals now offer multiple font weights.

These lighter variants, however, expand the terminal’s color palette and can be used by applications like Taskwarrior. screenshot-2024-11-03-13-44-01

So, the goal was to extend the existing themes, not to create new theme variants — unless keeping bright the same as regular is an intentional principle you’re aiming to maintain.

d2718nis commented 1 week ago

Anyway, I went ahead and created a PR #8 with the proposed changes to help keep things moving. I’m open to discussing the bright color variants if you feel that’s not the right direction for this theme. Otherwise, feel free to merge the changes. Thanks!

EuCaue commented 1 week ago

I think it would be best not to override the default colors from the rose-pine palette directly in the original file, as it could be a bit confusing. Separating them into different files might make things clearer, especially for anyone who just wants the default colors. But it's definitely a great addition! =D

d2718nis commented 1 week ago

Sure, I'll move them to separate files then. Something like rose-pine-extended. I'll ping you in the PR when it's done