webDriver API——第14部分Color Support

class selenium.webdriver.support.color.Color(redgreenbluealpha=1)

Bases: object

Color conversion support class

Example:

from selenium.webdriver.support.color import Color

print(Color.from_string('#00ff33').rgba)
print(Color.from_string('rgb(1, 255, 3)').hex)
print(Color.from_string('blue').rgba)
static from_string(str_)
hex
rgb
rgba

posted on 2015-04-29 22:49  帅胡  阅读(278)  评论(0编辑  收藏  举报

导航