Closed nanobowers closed 3 years ago
First, thank you for your pull-request. I consider how to handle this and I decided that I don't merge this.
My consideration is below:
BrailleCanvas#plot!
, color
argument must be a Symbol. This restriction comes from UnicodePlot.jl. I don't think this is a bug because UnicodePlot.jl explicitly restrict the type of the argument.I don't know what it is, but it's a pity I can't use a lot of colors...
Never mind. This is just a statement of my feelings. Not about the coding.
At least @colors[index] |= COLOR_ENCODE.fetch(color, color)
isn't acceptable to me. Even if this change is merged, you cannot use many colors for every case.
@mrkn I agree with your assessment. This fix was kind of a hack, and is not a good long term solution. I will close this request.
To fix this properly will require better support for 256 color mode (and true 24bit) which is more complex and will take some time. Sorry to get your hopes up, @kojix2 - i will try to look at that again when i am finished working on #30
Some support for 256 color mode was allowed in the styled_printer.rb, however it could not be fully accessed. I have updated the code to allow for a numeric value of a color (0..255) to be used, or a symbol.
Some things that i have found doing this:
color: :blue
). Definitions for the light colors (e.g.:light_blue
) and black exist, but are not accessible to plotting. I am unsure if this is a bug or feature.|
to OR together the color's number for a given screen element. This is a nice effect for 8-color mode (e.g. can blend blue and yellow to make green), but this may not give a desired result for 256 color mode (e.g. color 0b11110000 and color 0b00001111 will blend to color 0b11111111)I believe this will fix issue #34 from @kojix2 , but If there is a desire to support the full range of the basic 16 ANSI color palette or blending is needed for the 256 color palette then we will need to consider more complex methods to handle it.