Home Questions how can i generate a temporary circle on the screen by using vcodes?

how can i generate a temporary circle on the screen by using vcodes?

DWQA QuestionsCategory: KINARM End-Point Labhow can i generate a temporary circle on the screen by using vcodes?
Yihui Xu asked 5 years ago
hi, I am now trying to create a circle by using vcodes. I already know that the color of the circle is controlled by VCODES(1,5), but what kind of value should I put to get certain color?
1 Answers
Koloman Varady Staff answered 5 years ago

Hi Yihui,
The colour value is the decimal equivalent of the RGB value. What I do is take the hex value from any online hex colour picker (I like this one https://htmlcolorcodes.com/color-picker/) and convert it to decimal with hex2dec in MATLAB.

For example, if you want a bright red, the hex value is #FF0000

red = hex2dec('FF0000');

then the vcode for a circle with fill colour red that is 1 cm radius is

circle_vcode = [1 1 x y red 0 0 0 100 0.01 zeros(1,60)];

Cheers,

Koloman