What color codes work with what?
Posted: 2007-07-29T17:33:54-07:00
I have been trying to do some backgrounds. I seems sometimes it works to use the color names, sometimes using hex values, sometimes rgb, sometimes cmyk. I have been trying to do some transparency and have had some mixed results. Please comment on these things I have tried and the results.
convert -pointsize 24 -gravity center -fill red -background "#ffffff20" label:"TEXTINFO" "C:\pcshare\pcgraphics\graphics_library\PC\HOTBALLOON_PC.JPG" +swap -gravity northwest -geometry +100+200 -composite "c:\pcshare\pcgraphics\PCQT_IMAGES\F1237.jpg"
Using #ffffff20 works as expected.
convert -pointsize 24 -gravity center -fill red -background "rgb(255,255,255,255)" label:"TEXTINFO" "C:\pcshare\pcgraphics\graphics_library\PC\HOTBALLOON_PC.JPG" +swap -gravity northwest -geometry +100+200 -composite "c:\pcshare\pcgraphics\PCQT_IMAGES\F1237.jpg"
This does not do transparency. It seems to ignore the 4th argument. Ditto for cmyk.
Using washing around the font:
convert -font arial -pointsize 24 -gravity center -fill "red" -background none label:"TEXTINFO" -trim ( +clone -background "white" -shadow 100x4+0+0 -channel A -evaluate multiply 10 +channel ) +swap +repage -gravity center -composite +geometry "C:\pcshare\pcgraphics\graphics_library\PC\HOTBALLOON_PC.JPG" -gravity northwest -geometry +100+200 +swap -composite "c:\pcshare\pcgraphics\PCQT_IMAGES\F1237.jpg"
This works fine and as expected.
If it try #anything as well as #ffffff10 I get the following error: convert: invalid argument for option `+channel': -evaluate.
If I try rgba or cmyka (rgb(255,255,255,17) or cmyk(255,255,255,255,17)) it just ignores the tranparency.
Any suggestions or help on how to improve this would be greatly appreciated.
IM rocks!
Thanks, Troy
convert -pointsize 24 -gravity center -fill red -background "#ffffff20" label:"TEXTINFO" "C:\pcshare\pcgraphics\graphics_library\PC\HOTBALLOON_PC.JPG" +swap -gravity northwest -geometry +100+200 -composite "c:\pcshare\pcgraphics\PCQT_IMAGES\F1237.jpg"
Using #ffffff20 works as expected.
convert -pointsize 24 -gravity center -fill red -background "rgb(255,255,255,255)" label:"TEXTINFO" "C:\pcshare\pcgraphics\graphics_library\PC\HOTBALLOON_PC.JPG" +swap -gravity northwest -geometry +100+200 -composite "c:\pcshare\pcgraphics\PCQT_IMAGES\F1237.jpg"
This does not do transparency. It seems to ignore the 4th argument. Ditto for cmyk.
Using washing around the font:
convert -font arial -pointsize 24 -gravity center -fill "red" -background none label:"TEXTINFO" -trim ( +clone -background "white" -shadow 100x4+0+0 -channel A -evaluate multiply 10 +channel ) +swap +repage -gravity center -composite +geometry "C:\pcshare\pcgraphics\graphics_library\PC\HOTBALLOON_PC.JPG" -gravity northwest -geometry +100+200 +swap -composite "c:\pcshare\pcgraphics\PCQT_IMAGES\F1237.jpg"
This works fine and as expected.
If it try #anything as well as #ffffff10 I get the following error: convert: invalid argument for option `+channel': -evaluate.
If I try rgba or cmyka (rgb(255,255,255,17) or cmyk(255,255,255,255,17)) it just ignores the tranparency.
Any suggestions or help on how to improve this would be greatly appreciated.
IM rocks!
Thanks, Troy