根据给定的字符串生成颜色。-Swift开发

时间:2021-05-27 06:55:27
【文件属性】:
文件名称:根据给定的字符串生成颜色。-Swift开发
文件大小:358KB
文件格式:ZIP
更新时间:2021-05-27 06:55:27
Swift Colors PFColorHash Swift 4.0支持! 根据给定的字符串生成颜色。 多亏了颜色哈希。 用法基本方法让colorHash = PFColorHash()//在HSL中,色相∈[0,360),饱和度∈[0,1],亮度∈[PFColorHash Swift 4.0支持! 根据给定的字符串生成颜色。 多亏了颜色哈希。 用法基本方法let colorHash = PFColorHash()//在HSL中,色相∈[0,360),饱和度∈[0,1],亮度∈[0,1] colorHash.hsl('Hello World')// [225, 0.65,0.35] //在RGB,R,G,B∈[0,255] colorHash.rgb('Hello World')// [134,150,196] //在HEX colorHash.hex('Hello World' )//'#8696c4'自定义哈希函数/亮度/饱和度让colorHash = PFColorHash(hash:{(str:String)
【文件预览】:
PFColorHash-master
----Class()
--------PFColorHash.swift(4KB)
----.swift-version(3B)
----Sample.gif(479KB)
----PFColorHash()
--------ViewController.swift(3KB)
--------Info.plist(1KB)
--------AppDelegate.swift(2KB)
--------Base.lproj()
--------Images.xcassets()
----LICENSE(1KB)
----PFColorHashTests()
--------Info.plist(733B)
--------PFColorHashTests.swift(894B)
----README.md(1KB)
----PFColorHash.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(17KB)
----.gitignore(644B)
----PFColorHash.podspec(698B)

网友评论