File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change 52
52
53
53
Base. show (io:: IO , h:: TextHeatmap ) = print_heatmap (io, h)
54
54
55
- print_heatmap (h:: TextHeatmap ) = print_heatmap (stdout , h)
56
55
function print_heatmap (io:: IO , h:: TextHeatmap )
57
56
for (word, color) in zip (h. words, h. colors)
58
57
print (io, set_crayon (color), word)
@@ -67,10 +66,8 @@ function set_crayon(bg::RGB{N0f8})
67
66
return Crayon (; background= background, foreground= foreground)
68
67
end
69
68
70
- get_color_indices (c:: Colorant ) = get_color_indices (convert (RGB{N0f8}, c))
71
69
get_color_indices (c:: RGB{N0f8} ) = (c. r. i, c. g. i, c. b. i)
72
70
73
- is_background_bright (bg:: Colorant ) = is_background_bright (convert (RGB, bg))
74
71
is_background_bright (bg:: RGB ) = luma (bg) > 0.5
75
72
luma (c:: RGB ) = 0.2126 * c. r + 0.7152 * c. g + 0.0722 * c. b # using BT. 709 coefficients
76
73
You can’t perform that action at this time.
0 commit comments