You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I was thinking that it would be nice if I could tell coderay
to use these colour codes instead.
The gem that outputs the KDE colour codes is
gem install konsole_colours
The ansi escape code that should work in kde konsole is this:
puts "\e[38;2;#{222};#{131};#{141}m Hello world!"
To test; you can see the 3 values here; R,G,B ... 222, 131, 141
Would it be possible to use coderay to also use this scheme, optionally?
If so, how and where?
I think what I would need is a simple way to overrule the default colour
codes used. Some way to make it permanent, perhaps in a new file,
or if I can somehow load this palette into Coderay. The gem
konsole_colours already provides the proper values, i.e.
I can do:
KonsoleColours['slateblue']
=> "\e[38;2;106;90;205m\e[0;0m\e[0;37m"
And the proper R,G,B values are returned.
I can easily change this to return an array with three
values, representing R,G,B.
Do you think there is any way to load up custom colours into
Coderay?
The text was updated successfully, but these errors were encountered:
CodeRay is optimized for HTML, actually. I only added terminal support later.
My plan is still to integrate 256color support through the Paint gem (#118). This would allow for nicer colors.
There's no plan currently to allow terminal color "schemes". The Style definitions are basically CSS files. If anything, I'd like to have color schemes that can be used for both HTML and the terminal.
It's interesting that KDE has support for full RGB colors. That would certainly make things a bit easier.
Hey Kornelius,
With coderay one can parse or colourize ruby code even on the commandline.
For instance:
cat foo.rb | coderay -ruby
would colourize as can be seen on this partial screenshot:
http://oi61.tinypic.com/2iijx50.jpg
Now, in KDE konsole, I recently found out that you can
use R,G,B values.
Here is an example, from kde konsole itself:
http://oi61.tinypic.com/dqna6r.jpg
So far so fine.
Now I was thinking that it would be nice if I could tell coderay
to use these colour codes instead.
The gem that outputs the KDE colour codes is
gem install konsole_colours
The ansi escape code that should work in kde konsole is this:
puts "\e[38;2;#{222};#{131};#{141}m Hello world!"
To test; you can see the 3 values here; R,G,B ... 222, 131, 141
Would it be possible to use coderay to also use this scheme, optionally?
If so, how and where?
I think what I would need is a simple way to overrule the default colour
codes used. Some way to make it permanent, perhaps in a new file,
or if I can somehow load this palette into Coderay. The gem
konsole_colours already provides the proper values, i.e.
I can do:
KonsoleColours['slateblue']
=> "\e[38;2;106;90;205m\e[0;0m\e[0;37m"
And the proper R,G,B values are returned.
I can easily change this to return an array with three
values, representing R,G,B.
Do you think there is any way to load up custom colours into
Coderay?
The text was updated successfully, but these errors were encountered: