当前位置:网站首页>Cesium color color (assignment) random color
Cesium color color (assignment) random color
2022-06-28 02:09:00 【The most ferocious little seal】
Assignment method :
1. English color words
// Set the color : Cesium.Color. Color
Cesium.Color.WHITE;
// Set color and transparency : esium.Color. Color . transparency
Cesium.Color.BLUE.withAlpha(0.4)
// transparent color
Cesium.Color.TRANSPARENT;
2. rgba(0-255 Section ) Be careful : here alpha It's also 0-255 Section
// Cesium.Color.fromBytes(red ,green ,blue ,alpha ,result)
// result Is the color setting result , Objects that can be stored to can also be saved without .
Cesium.Color.fromBytes(177, 0, 4, 200);
3. rgba(0-1 Section ) Calculation method :255 The value of the interval / 255
// Cesium.Color(red, green, blue, alpha)
Cesium.Color(177/255, 0/255, 4/255, 1)
Cesium.Color(0.165, 0.165, 0.165, 1)
4. CSS Color conversion
// Cesium.Color.fromCssColorString('CSS Color value ')
Cesium.Color.fromCssColorString("#ffffff")
Cesium.Color.fromCssColorString("rgba(255, 255, 255, 0.75)")
6. 32 position GRBA value
// Cesium.Color.fromRgba(rgba, result)
Cesium.Color.fromRgba(0x67ADDFFF)
7. Random color
// Cesium.Color.fromRandom({alpha: transparency })
Cesium.Color.fromRandom({
alpha: 0.5})
Tips :
Only change the transparency without changing the original color , have access to getValue Method
// Set font fill transparency
label.fillColor = label.fillColor.getValue().withAlpha(0.8);
// Set the transparency of the font border
label.outlineColor= label.outlineColor.getValue().withAlpha(0.8);
// Set the transparency of the underground color of the ball ( Here we use undergroundColor And back again Cesium.Color object )
globe.viewer.scene.globe.undergroundColor.withAlpha(0.8)
边栏推荐
- Set collection usage
- 如何阅读一篇论文
- 树莓派实现温控风扇智能降温
- 混合app的介绍
- ionic4实现半星评分
- ShardingSphere-proxy-5.0.0建立mysql读写分离的连接(六)
- fiddle如何使用代理
- [elt.zip] openharmony paper Club - memory compression for data intensive applications
- Review of drug discovery-03-molecular design and optimization
- Lefse analyzes the local implementation method with all installation files and details to ensure success.
猜你喜欢

Chapitre 4: redis

什麼是數字化?什麼是數字化轉型?為什麼企業選擇數字化轉型?
![pytorch_lightning.utilities.exceptions.MisconfigurationException: You requested GPUs: [1] But...](/img/b4/8921c3ca5cd5a547768489d4a79202.png)
pytorch_lightning.utilities.exceptions.MisconfigurationException: You requested GPUs: [1] But...

Adobe Premiere基础-常用的视频特效(裁剪,黑白,剪辑速度,镜像,镜头光晕)(十五)

基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例

【嵌入式基础】内存(Cache,RAM,ROM,Flash)

【嵌入式基础】串口通信

Web3 technology initial experience and related learning materials

Original | 2025 to achieve the "five ones" goal! The four products of Jiefang power are officially released

TI AM3352/54/59 工业核心板硬件说明书
随机推荐
如何阅读一篇论文
解决ionic4 使用hammerjs手势 press 事件,页面无法滚动问题
centos8-操作记录-命令版-yum-redis-mysql-nacos-jdk
[Yocto RM] 2 - Yocto Project Terms
205. isomorphic string
Can you open an account for stock trading in flush? Is it safe?
mysql面试百题集
Prometeus 2.35.0 新特性
1382. 将二叉搜索树变平衡-常规方法
Original | 2025 to achieve the "five ones" goal! The four products of Jiefang power are officially released
零基礎多圖詳解圖神經網絡
How fiddle uses agents
Adobe Premiere基础-编辑素材文件常规操作(脱机文件,替换素材,素材标签和编组,素材启用,便捷调节不透明度,项目打包)(十七)
如何理解 Transformer 中的 Query、Key 与 Value
[Yocto RM]3 - Yocto Project Releases and the Stable Release Process
【ELT.ZIP】OpenHarmony啃论文俱乐部—数据密集型应用内存压缩
Description du format geojson (détails du format)
Coscon'22 lecturer solicitation order
【sylixos】NEW_ Example of type 1 character drive
Adobe Premiere Basics - common video effects (cropping, black and white, clip speed, mirroring, lens halo) (XV)