jon*_*n.s 2 macos rgb applescript colors
我正在尝试使用AppleScript来更改Finder窗口的背景颜色并遇到这段代码片段,这似乎有用......但是,我不确定颜色数组的逻辑...
tell the icon view options of the front Finder window
set the background color to {52942, 54484, 31097}
end tell
Run Code Online (Sandbox Code Playgroud)
AppleScript魔术的{52942,54484,31097}是指什么?它对我来说看起来不像RGB ......我怎样才能获得像红色(#ff0000 | 255,0,0)或者更好的霓虹青色(#00f6ff | 0,246,255)?
RGB颜色有四种不同的数字表示.
Notation
- RGB triplet
(红色)
1-算术 - (1.0,0.0,0.0)
2-百分比 - (100%,0%,0%)
3-每通道数字8位 - (255,0,0)或有时#FF0000(十六进制)
4-每通道数字16位 - (65535,0,0)
组件值通常存储为0到255范围内的整数,即单个8位字节可提供的范围.这些通常表示为十进制或十六进制数字.
将整数(standard RGB value
)乘以257,得到每通道数字16位的值(AppleScript)
归档时间: |
|
查看次数: |
2186 次 |
最近记录: |