Specified character vector is an invalid color value

Post Reply
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

Specified character vector is an invalid color value

Post by matlab1 »

Specified character vector is an invalid color value
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

Re: Specified character vector is an invalid color value

Post by matlab1 »


example :

% Convert color code to 1-by-3 RGB array (0~1 each)
str = '#FF0000';


color = sscanf(str(2:end),'%2x%2x%2x',[1 3])/255;
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests