mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Implement syntax highlighting
This commit is contained in:
parent
4d61ad87b3
commit
c2e549b79c
8 changed files with 280 additions and 18 deletions
|
|
@ -82,6 +82,10 @@ func (self *RGBA) AsRGB() uint32 {
|
|||
return uint32(self.Blue) | (uint32(self.Green) << 8) | (uint32(self.Red) << 16)
|
||||
}
|
||||
|
||||
func (self *RGBA) IsDark() bool {
|
||||
return self.Red < 155 && self.Green < 155 && self.Blue < 155
|
||||
}
|
||||
|
||||
func (self *RGBA) FromRGB(col uint32) {
|
||||
self.Red = uint8((col >> 16) & 0xff)
|
||||
self.Green = uint8((col >> 8) & 0xff)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue