Krpano_獲取隨機顏色的方法

原文地址:https://victu360.com/archives/4474

實現方法一:

2

3

4

<action name="getRandomColor">

  calc(%1, random * 0xFFFFFF);

  tohex(%1, %2, 6);

</action>

 

實現方法二:

2

3

4

5

6

7

8

9

10

11

getRandomColor(color, '#');

trace(get(color));

 

getRandomColor(color, '0x');

trace(get(color));

 

<action name="getRandomColor">

mul(%1, random, 16777215);

roundval(%1);

tohex(%1,%2,6);

</action>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章