Support RGB8 colour specifications
The API of TickitPen was carefully designed to allow the two colour attributes to be specified in a multitude of forms. One such form would be a { uint8_t r, g, b } triplet, for those terminals that support the SGR 38:2:r:g:b scheme.
There are some questions though, namely:
* Try to detect from the terminal driver if RGB8 is going to be supported
* On the (frankly, likely) chance that it isn't, how to handle this? Should the library try to translate to "nearest 256", like it downsamples 256 to 16 or 8-colour palettes?
* What happens if you set a pen colour using either RGB8 or xterm256 models and then try to query its value via the other?
Blueprint information
- Status:
- Complete
- Approver:
- Paul "LeoNerd" Evans
- Priority:
- Low
- Drafter:
- Paul "LeoNerd" Evans
- Direction:
- Approved
- Assignee:
- None
- Definition:
- Approved
- Series goal:
- Accepted for trunk
- Implementation:
-
Implemented
- Milestone target:
-
v0.2
- Started by
- Paul "LeoNerd" Evans
- Completed by
- Paul "LeoNerd" Evans
Related branches
Related bugs
Sprints
Whiteboard
<LeoNerd> http://
<LeoNerd> Need more 'valid' bits
<LeoNerd> http://
<LeoNerd> http://
<LeoNerd> Also the '12' above now needs to become 16
<LeoNerd> I suspect for a first cut that should be it. Enough to prove a PoC. Additionally the non-xterm driver will want some workaround for what to do if there is RGB8 set on the pen.. how to handle that down to the 256/88/16/8 colour palette
---
Started writing some code, putting them in totally unrelated attributes called FG_RGB8 and BG_RGB8. Further thought needs to be had on whether that's really the best way, or whether merging them together might be nicer. Need to decide how to handle "fallback" - setting both RGB8 and 256 index at once.
Work Items
Work items:
code: INPROGRESS
tests: TODO
docs: TODO
xterm driver: TODO
TI driver: TODO