当前位置:网站首页>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)
边栏推荐
- Voice network VQA: make the user's subjective experience of unknown video quality in real-time interaction known
- [Yocto RM]8 - OpenEmbedded Kickstart (.wks) Reference
- [Yocto RM] 4 - Source Directory Structure
- Réseau neuronal pour la solution détaillée Multi - diagrammes de fondation zéro
- Intensive reading of transformer thesis paragraph by paragraph
- Data analysts too hot? Monthly income 3W? Tell you the true situation of this industry with data
- Comprehensive evaluation of free, easy-to-use and powerful open source note taking software
- 数据库的新选择 Amazon Aurora
- Numpy----np.tile()函数解析
- frp实现内网穿透
猜你喜欢

Cesium 抗锯齿(线,边框等)

【嵌入式基础】串口通信

766. toplitz matrix

How to understand query, key and value in transformer

What problems should be evaluated before implementing MES management system

Solon 1.8.3 release, cloud native microservice development framework

Using redis bitmap to realize personnel online monitoring

Numpy----np. meshgrid()

frp实现内网穿透

Voice network VQA: make the user's subjective experience of unknown video quality in real-time interaction known
随机推荐
数据库查询优化:主从读写分离及常见问题
Evaluation - grey correlation analysis
Using redis bitmap to realize personnel online monitoring
对比学习中的4种经典训练模式
Adobe Premiere Basics - common video effects (corner positioning, mosaic, blur, sharpen, handwriting tools, effect control hierarchy) (16)
Is it safe to open an online futures account?
How to optimize the "message" list of IM
面试官问:能否模拟实现JS的new操作符
Four classic training modes in comparative learning
要搞清楚什么是同步,异步,串行,并行,并发,进程,线程,协程
Numpy----np. Tile() function parsing
[Yocto RM]8 - OpenEmbedded Kickstart (.wks) Reference
Deep parsing of kubernetes controller runtime
Set collection usage
Cesium 获取屏幕所在经纬度范围
什麼是數字化?什麼是數字化轉型?為什麼企業選擇數字化轉型?
205. 同构字符串
Cesium 多边形(polygon)extrudedHeight 和 height 的区别
【牛客討論區】第四章:Redis
How to read a paper