1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AEスクリプト テキストの塗りについて

Posted at

テキストレイヤーの色設定

ちょっとごちゃっとしてたのでメモ
(ついでにカラーを設定するのに便利なスクリプトも)

スクリプトでテキストを追加して色も指定する場合

/////color HAX/////
function colorSetToRgb(set){
        var bigint = parseInt (set, 16);
        var r = (bigint >> 16) & 255;
        var g = (bigint >> 8) & 255;
        var b = bigint & 255;
        
        return [r/255,g/255,b/255];
   }


/////color settings/////
var color1 = colorSetToRgb("FFFFFF");


var myComp = app.project.items.addComp("COMP NAME",1920,1080,1.0,30,30);
var myText = myComp.layers.addText("text Here");
var myTextV = myText.property("ADBE Text Properties").property("ADBE Text Document").value;
myTextV.applyFill = true;
myTextV.fillColor = color1;
myText.property("ADBE Text Properties").property("ADBE Text Document").setValue(myTextV);
1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?