.colors not working?
- gmc_nxtman
- Posts: 1150
- Joined: May 26th, 2015, 7:20 pm
.colors not working?
I'm trying to change the colors for the RuleLoader implementation of life, but when I save these strings of text into "life.colors" in my Rules folder, nothing happens, even after restarting golly:
@COLORS
0 255 255 255
1 4 42 128
@COLORS
0 255 255 255
1 4 42 128
- Alexey_Nigin
- Posts: 326
- Joined: August 4th, 2014, 12:33 pm
- Location: Ann Arbor, MI
- Contact:
Re: .colors not working?
Code: Select all
@RULE B3_S23
@COLORS
0 255 255 255
1 4 42 128
There are 10 types of people in the world: those who understand binary and those who don't.
- gmc_nxtman
- Posts: 1150
- Joined: May 26th, 2015, 7:20 pm
Re: .colors not working?
Shouldn't it be B3_S23.colors? Anyway, it doesn't work...... sorry. It has the same error that appears when you enter an invalid rule: "Error: The given rule is not valid in any algorithm"
-
- Posts: 1175
- Joined: June 14th, 2014, 5:03 pm
- Contact:
Re: .colors not working?
Try pasting this into Golly:
Code: Select all
@RULE Life
@COLORS
0 255 255 255
1 4 42 128
- gmc_nxtman
- Posts: 1150
- Joined: May 26th, 2015, 7:20 pm
Re: .colors not working?
Thanks!
Now, is there a way to convert any life-like cellular automaton rulestring to a .table format? I think there might be python script for this but I'm not sure.
Now, is there a way to convert any life-like cellular automaton rulestring to a .table format? I think there might be python script for this but I'm not sure.
Re: .colors not working?
There is no python script there.gmc_nxtman wrote:Thanks!
Now, is there a way to convert any life-like cellular automaton rulestring to a .table format? I think there might be python script for this but I'm not sure.
Success consists of going from failure to failure without loss of enthusiasm. Quotes about success on Wikipedia, Oxford that teach us to be wiser
Re: .colors not working?
It wouldn't be terribly difficult to write a generalized table-generating Python script. Here's a sample of the kind of output the script would generate:gmc_nxtman wrote:...is there a way to convert any life-like cellular automaton rulestring to a .table format? I think there might be python script for this but I'm not sure.
Code: Select all
@RULE B3678_S34678
Sample conversion of a Life-like rule (Day and Night) to table format
(As usual, just copy all this text, then in Golly choose File > Open Clipboard.)
state 0: OFF
state 1: ON
@TABLE
n_states:2
neighborhood:Moore
symmetries:permute
var a={0,1}
var b={0,1}
var c={0,1}
var d={0,1}
var e={0,1}
var f={0,1}
var g={0,1}
var h={0,1}
var i={0,1}
# 3-neighbor birth
0,1,1,1,0,0,0,0,0,1
# 6-neighbor birth
0,1,1,1,1,1,1,0,0,1
# 7-neighbor birth
0,1,1,1,1,1,1,1,0,1
# 8-neighbor birth
0,1,1,1,1,1,1,1,1,1
# 3-neighbor survival
1,1,1,1,0,0,0,0,0,1
# 4-neighbor survival
1,1,1,1,1,0,0,0,0,1
# 6-neighbor survival
1,1,1,1,1,1,1,0,0,1
# 7-neighbor survival
1,1,1,1,1,1,1,1,0,1
# 8-neighbor survival
1,1,1,1,1,1,1,1,1,1
# all other cells die
a,b,c,d,e,f,g,h,i,0
@COLORS
1 216 255 216
@ICONS
XPM
/* width height num_colors chars_per_pixel */
"31 31 5 1"
/* colors */
". c #000000"
"B c #404040"
"C c #808080"
"D c #C0C0C0"
"E c #FFFFFF"
/* icon for state 1 */
"..............................."
"..............................."
"..........BCDEEEEEDCB.........."
".........CEEEEEEEEEEEC........."
".......BEEEEEEEEEEEEEEEB......."
"......DEEEEEEEEEEEEEEEEED......"
".....DEEEEEEEEEEEEEEEEEEED....."
"....BEEEEEEEEEEEEEEEEEEEEEB...."
"....EEEEEEEEEEEEEEEEEEEEEEE...."
"...CEEEEEEEEEEEEEEEEEEEEEEEC..."
"..BEEEEEEEEEEEEEEEEEEEEEEEEEB.."
"..CEEEEEEEEEEEEEEEEEEEEEEEEEC.."
"..DEEEEEEEEEEE...EEEEEEEEEEED.."
"..EEEEEEEEEEE.....EEEEEEEEEEE.."
"..EEEEEEEEEE.......EEEEEEEEEE.."
"..EEEEEEEEEE.......EEEEEEEEEE.."
"..EEEEEEEEEE.......EEEEEEEEEE.."
"..EEEEEEEEEEE.....EEEEEEEEEEE.."
"..DEEEEEEEEEEE...EEEEEEEEEEED.."
"..CEEEEEEEEEEEEEEEEEEEEEEEEEC.."
"..BEEEEEEEEEEEEEEEEEEEEEEEEEB.."
"...CEEEEEEEEEEEEEEEEEEEEEEEC..."
"....EEEEEEEEEEEEEEEEEEEEEEE...."
"....BEEEEEEEEEEEEEEEEEEEEEB...."
".....DEEEEEEEEEEEEEEEEEEED....."
"......DEEEEEEEEEEEEEEEEED......"
".......BEEEEEEEEEEEEEEEB......."
".........CEEEEEEEEEEEC........."
"..........BCDEEEEEDCB.........."
"..............................."
"..............................."
XPM
/* width height num_colors chars_per_pixel */
"15 15 5 1"
/* colors */
". c #000000"
"B c #404040"
"C c #808080"
"D c #C0C0C0"
"E c #FFFFFF"
/* icon for state 1 */
"..............."
"....BDEEEDB...."
"...DEEEEEEED..."
"..DEEEEEEEEED.."
".BEEEEEEEEEEEB."
".DEEEEEEEEEEED."
".EEEEE...EEEEE."
".EEEEE...EEEEE."
".EEEEE...EEEEE."
".DEEEEEEEEEEED."
".BEEEEEEEEEEEB."
"..DEEEEEEEEED.."
"...DEEEEEEED..."
"....BDEEEDB...."
"..............."
XPM
/* width height num_colors chars_per_pixel */
"7 7 6 1"
/* colors */
". c #000000"
"B c #404040"
"C c #808080"
"D c #C0C0C0"
"E c #FFFFFF"
"F c #E0E0E0"
/* icon for state 1 */
".BFEFB."
"BEEEEEB"
"FEE.EEF"
"EE...EE"
"FEE.EEF"
"BEEEEEB"
".BFEFB."
Code: Select all
# 3-, 6-, 7-, and 8-neighbor birth and survival
a,1,1,1,0,0,0,0,0,1
a,1,1,1,1,1,1,0,0,1
a,1,1,1,1,1,1,1,0,1
a,1,1,1,1,1,1,1,1,1
# 4-neighbor survival
1,1,1,1,1,0,0,0,0,1
# all other cells die
a,b,c,d,e,f,g,h,i,0
With a less clever definition, you don't even need variables, and you can produce a table for any Life-like rule just by changing the last characters in every line in the table to 0 or 1 as appropriate:
Code: Select all
@TABLE
n_states:2
neighborhood:Moore
symmetries:permute
#C OFF cells -- 1 at the end for birth conditions
0,0,0,0,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,0
0,1,1,0,0,0,0,0,0,0
0,1,1,1,0,0,0,0,0,1
0,1,1,1,1,0,0,0,0,0
0,1,1,1,1,1,0,0,0,0
0,1,1,1,1,1,1,0,0,1
0,1,1,1,1,1,1,1,0,1
0,1,1,1,1,1,1,1,1,1
#C ON cells -- 1 at the end for survival conditions
1,0,0,0,0,0,0,0,0,0
1,1,0,0,0,0,0,0,0,0
1,1,1,0,0,0,0,0,0,0
1,1,1,1,0,0,0,0,0,1
1,1,1,1,1,0,0,0,0,1
1,1,1,1,1,1,0,0,0,0
1,1,1,1,1,1,1,0,0,1
1,1,1,1,1,1,1,1,0,1
1,1,1,1,1,1,1,1,1,1
- SuperSupermario24
- Posts: 121
- Joined: July 22nd, 2014, 12:59 pm
- Location: Within the infinite expanses of the Life universe
Re: .colors not working?
Just to be clear: you are aware that Golly no longer (officially) uses .color or .table or any of those file extensions, right? All those are combined into the .rule format now.
Code: Select all
bobo2b3o2b2o2bo3bobo$obobobo3bo2bobo3bobo$obobob2o2bo2bobo3bobo$o3bobo3bo2bobobobo$o3bob3o2b2o3bobo2bo!
Re: .colors not working?
In Golly 2.8
LifeHistory (and some rules) icon colors do not work.
Sometimes one color, sometimes multicolored cells (vertical stripes).
They work in Golly 2.5 , though.
????
LifeHistory (and some rules) icon colors do not work.
Sometimes one color, sometimes multicolored cells (vertical stripes).
They work in Golly 2.5 , though.
????
100009436650194649 = 94649 * 1056634900001
Re: .colors not working?
I've been using LifeHistory in Golly 2.8 for quite a while now, without seeing any of these problems. But it all does sound vaguely familiar. I may well have forgotten something I used to know about this...!AbhpzTa wrote:In Golly 2.8
LifeHistory (and some rules) icon colors do not work.
Sometimes one color, sometimes multicolored cells (vertical stripes).
They work in Golly 2.5 , though.
????
Are you using .table or .colors or .icons files with Golly 2.8, instead of the new combined .rule files ? If so, what happens if you use those files to build a standard .rule file, or use the LifeHistory.rule supplied with Golly 2.8?
It seems possible that you've ended up with an old leftover LifeHistory.icons or some such, wherever you have Golly's default Rules folder set up (?) and it's trying to work with that instead of finding {root Golly directory}/Rules/LifeHistory.rule.
Re: .colors not working?
Please tell me how to save .colors/icons files.
100009436650194649 = 94649 * 1056634900001
Re: .colors not working?
If I'm understanding the question correctly -- see SuperSupermario24's link to .rule format, above. The idea is to build one file, with a .rule extension, that contains all the .table and .colors and .icons pieces that used to be in separate files. It makes it a lot easier to move rules around, quote them in forum posts, and so on.AbhpzTa wrote:Please tell me how to save .colors/icons files.
Start the rule file with @RULE and the name of the rule.
If you have an existing .table file, put it in a @TABLE section of the .rule file.
If you have an existing .colors file, put it in a @COLORS section of the .rule file.
If you have an existing .icons file, put it in an @ICONS section of the .rule file.
That's really pretty much all there is to it, I think. Let me know if you have more specific questions -- maybe attach or quote whatever files you're having trouble with.
Re: .colors not working?
Forget trying to use .colors/icons files -- eventually Golly will stop supporting them. In 2.8 you can select Control > Convert Old Rules to automatically create .rule files from any .table/tree/colors/icons files. At the end of the process you'll be asked if you want Golly to delete those files. My advice is to click Yes (do a backup of your rules folder first if you really want to keep them).AbhpzTa wrote:Please tell me how to save .colors/icons files.
See Help > File Formats for a detailed description of the .rule format if you want to change the colors/icons for an existing rule.