Commit Graph

13 Commits

Author SHA1 Message Date
Garrett D'Amore d78960c02d Color fixups. 2023-02-20 20:52:19 -08:00
Garrett D'Amore 3687c97d3d Sun terminal color fixes.
This addresses problems in the color handling found on Sun and illumos
consoles.  The infocmp for these terminals is buggy as well.
2021-05-31 17:59:55 -07:00
Spenser Black 8f925d8272 Implement FromImageColor
Converts from `image/color.Color` to `tcell.Color`.
2021-05-11 12:36:10 -07:00
Garrett D'Amore 368f8e092b fixes #376 Need ColorReset
This provides a ColorReset color that resets the color to
the default for the terminal.
2020-08-30 22:57:00 -07:00
Garrett D'Amore 5889c5f171 fixes #314 Implement `setf` & `setb`
This causes colors that are set that are low numbered to
be treated as themed colors -- basically honoring the palette
of the terminal.

The Style and Color implementations have changed quite a bit
to permit growth -- the colors are now 64-bits wide to permit
using the upper bits as flags, and to leave room for a future
alpha channel.

There is a new TrueColor() method on colors that obtains the
value as strict RGB value, and this will be used in lieu of
whatever terminal colors are provided -- giving the application
full control over the color space if they want, without
forcibly clobbering user preferences for terminals for the
vast majority of cases.

Indexed colors are created with the new PaletteColor API.
2020-08-25 22:26:48 -07:00
Kim Tore Jensen 01ac1e4067 Document and publish color names and RGB values. (#151)
* Document and publish color names and RGB values.

* Fix failing tests.
2017-06-20 20:27:38 -07:00
Garrett D'Amore c5d65ed603 fixes #76 Set some comments on constant blocks to silence golint 2015-11-04 19:18:59 -08:00
Garrett D'Amore 43f9cc0d07 fixes #75 Add goreport and fix related issues 2015-11-04 17:05:24 -08:00
Garrett D'Amore 7d8c78f17d fixes #61 Add color names & lookups 2015-10-28 14:03:04 -07:00
Garrett D'Amore 3a37c6d89f fixes #58 Use color space to find best matching colors
fixes #57 Windows build broken by color renames
2015-10-27 16:42:22 -07:00
Garrett D'Amore e90b190a07 fixes #56 Color space must increase
fixes #55 Color names are unfortunate
2015-10-27 14:29:32 -07:00
Garrett D'Amore b19d7067f2 fixes #26 Improved docs desired 2015-10-05 15:46:51 -07:00
Garrett D'Amore b4ae936d42 Initial import of Tcell. 2015-09-26 23:37:54 -07:00