fn_colorbyname
Contents
Syntax
[colornum colorname] = fn_colorbyname(colorval[,'strict'])
Description
Returns numerical value and name if it exists of color, passed either as a value or a string. If colorval does not represent a color, generates an error only if the 'strict' flag is used (otherwise it returns empty arrays).
Examples: [num name] = fn_colorbyname('r') returns [1 0 0] and 'red' [num name] = fn_colorbyname([0 0 0]) returns [0 0 0] and 'black' [num name] = fn_colorbyname([.1 .3 .4]) returns [.1 .3 .4] and ''
Source
Thomas Deneux
Copyright 2015-2017