LoginSignup
1
0

More than 5 years have passed since last update.

UIColorで設定した色よりも暗くなる。P3ディスプレイに対応する。

Last updated at Posted at 2016-11-04

環境

  • iMac 5kディスプレイ
  • MacOS: 10.11.6
  • Xcode:8.0
  • swift3
  • シュミレータ

UIColorで設定した色よりもシュミレータの色が暗い

UIColor(red: 255/255.0, green: 105/255.0, blue: 180/255.0, alpha: 1.0)

スクリーンショット 2016-11-04 12.50.14.png

P3ディスプレイって?

現在、Appleが「P3ディスプレイ」を採用している端末は非常に少ない。同ディスプレイを搭載しているのは「iMac 5Kディスプレイモデル」「iMac 4Kディスプレイモデル」そして9.7インチ型「iPad Pro」の3モデルのみだ。
https://corriente.top/post-14720/

iPhone7もP3ディスプレイ。

解決策

UIColorにiOS10から新しいイニシャライザが追加されたみたい。

UIColor(displayP3Red: 255/255.0, green: 105/255.0, blue: 180/255.0, alpha: 1.0)

実機での色の変化はまだ未確認です。わかったら追記します。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0