本文介绍了随机颜色生成器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
鉴于此功能,我想用随机颜色生成器替换颜色.
Given this function, I want to replace the color with a random color generator.
document.overlay = GPolyline.fromEncoded({
color: "#0000FF",
weight: 10,
points: encoded_points,
zoomFactor: 32,
levels: encoded_levels,
numLevels: 4
});
我该怎么做?
推荐答案
我怀疑任何事情都会比这个更快或更短:
I doubt anything will be faster or shorter than this one:
"#" + ((1<<24)*Math.random() | 0).toString(16)
挑战!
这篇关于随机颜色生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!