1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-15 13:33:12 +02:00

9 Commits

Author SHA1 Message Date
Alec Thomas
da5ac60d8c Add golangci-lint and fix all lint issues. 2018-12-31 22:46:59 +11:00
Alec Thomas
69c9a262c3 Expose Colour.BrightenOrDarken (useful for #211). 2018-12-31 10:48:45 +11:00
Alec Thomas
0961f82bc3 Fix nearest colour matching.
This was caused by precision loss due to using uint8. The cast to int64
was occurring in the wrong location.

Fixes #145.
2018-06-25 20:48:31 +10:00
Alec Thomas
d5083b3f7c Big changes to the style and colour APIs.
- Styles now use a builder system, to enforce immutability of styles.
- Corrected and cleaned up how style inheritance works.
- Added a brightening function to colours
- HTML formatter will now automatically pick line and highlight colours
  if they are not provided in the style. This is done by slightly
  darkening or lightening.

Fixes #21.
2017-09-23 22:09:46 +10:00
Alec Thomas
8170d52c25 Remove dependency on go-colorful.
Switched to a less accurate (but much simpler) colour distance function
as described here: https://www.compuphase.com/cmetric.htm

Fixes #17.
2017-09-22 23:00:03 +10:00
Alec Thomas
551f7cee9a Return errors for invalid styles, rather than panicking. 2017-09-21 12:52:08 +10:00
Alec Thomas
431e913333 Update documentation. Include "quick" package. 2017-09-18 13:15:07 +10:00
Alec Thomas
d12529ae61 HTML formatter + import all Pygments styles. 2017-07-20 00:01:29 -07:00
Alec Thomas
d852022f8d Move style and formatter API into chroma package. 2017-06-07 19:47:59 +10:00