griffin-stewie / clg Goto Github PK
View Code? Open in Web Editor NEWSupports generate clr file or code from ASE file a.k.a. "Adobe Swatch Exchange" etc.
Supports generate clr file or code from ASE file a.k.a. "Adobe Swatch Exchange" etc.
生成したcolors.xmlは以下のようになっています。
<!-- Palette generated by clg -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="thumbnail_background">#00FFFFFF</color>
</resources>
このファイルをAndroid Studioで使おうとすると、下記のビルドエラーが発生します。このエラーはxmlタグから始まらないと表示されてしまうようです。
Error: "[xX][mM][lL]"と一致する処理命令ターゲットは許可されていません。
IDE上では下図のようにエラーが表示されています。
解決方法としては、<!-- Palette generated by clg -->
を入れない、もしくはresourcesタグの直下に移動させる必要がありそうです。
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Palette generated by clg -->
<color name="thumbnail_background">#00FFFFFF</color>
</resources>
#colorLiteral(red: 0.57, green: 0.87, blue: 0.9, alpha: 1)
以下のコマンドを実行した時に生成されるAndroid向けのcolor.xmlにはalpha値が反映されていません。
clg code --output ${path} --code android ${path}/colors.json
colors.json では、以下のようにRGBAの並び順で定義しています。
[
{ "name": "thumbnail_background", "hex": "#05799259" }
]
生成される値は下記のようになり、alpha値が反映されていないことがわかります。
<color name="thumbnail_background_highlight">#057992</color>
This tool is staled now, but it needs updating to the latest.
We need JSON format document & some samples.
There is no subcommand options.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.