Color Management for Android O

Color Management for Android O

[shibuya.apk #15 - Report from Google I/O 2017]の登壇資料です。
https://shibuya-apk.connpass.com/event/57173/

資料のURL
Understanding Color (Google I/O '17)
https://youtu.be/r8NeG0wmFXM

Qiita「XYZ色空間に迫る」
http://qiita.com/Ushio/items/203f16ad1e23fd42231c

[ Android Developers | ColorSpace ]
https://developer.android.com/reference/android/graphics/ColorSpace.html

2e86c928ad46e757989b29cad8e7efa3?s=128

Koichi Kukino

June 02, 2017
Tweet

Transcript

  1. Color Management for Android O shibuya.apk #15 - Report from

    Google I/O 2017
  2. Koichi Kukino (ٱ໦໺ ᕣҰ) Android Application Developer ɹ @cookych t

  3. Goals ɾAndroid OͰ௥Ճ͞ΕͨColor Managementʹ͍ͭͯ஌Δ ɾ৭ʹ͍ͭͯʢ͍͍ͩͨʣཧղ͢Δ

  4. What is Color?

  5. ‹ › 5 ৭ͷࡾཁૉ ɾ৭૬ (hue) ɾ໌౓ (brightness) ɾ࠼౓ (colorfulness)

    Color ৭ͷࡾཁૉ (https:/ /ja.wikibooks.org/)
  6. ਓ͸Ͳ͏΍ͬͯ৭Λೝ͍ࣝͯ͠Δͷ͔

  7. ‹ › 7 Electromagnetic Spectrum Մࢹޫઢ ΨϯϚઢ Xઢ ࢵ֎ઢ ੺֎ઢ

    ϚΠΫϩ೾ ϥδΦ೾
  8. ‹ › 8 ɾਲ਼ମࡉ๔(͍͍͍ͨ͢͞΅͏)ɾɾɾ৭Λೝࣝ͢Δ ࡉ๔ ɾ੺ਲ਼ମɺ྘ਲ਼ମɺ੨ਲ਼ମͱ͍͏ࡾͭͷࡉ๔Ͱͦ ΕͧΕͷ೾௕ൣғͷޫΛೝࣝ͢Δ ɾࡾͭͷਲ਼ମ͕ड͚औͬͨͷܹࢗͷׂ߹ʹΑͬͯ ೴͕Կ৭ͳͷ͔൑அ͢Δ Color

    Recognition
  9. None
  10. ൓ࣹ ٵऩ ޫݯ͔Βͷޫ

  11. None
  12. ʮനͱۚʯorʮࠇͱ੨ʯʁ

  13. ৭ۭؒ (https:/ /ja.wikipedia.org/wiki/৭ۭؒ)

  14. ‹ › 14 ɾQiitaʮXYZ৭ۭؒʹഭΔʯ http:/ /qiita.com/Ushio/items/203f16ad1e23fd42231c References

  15. For Developers W

  16. ɾTuple of Numbers ɾColor Model ɾColor Space

  17. ‹ › 17 RGB, L*a*b, CMYK Color Model

  18. ‹ › 18 RGB, L*a*b, CMYK Color Model

  19. ‹ › 19 ɾ16ਐτϦϓϨοτදهɹ#FF436D ɾ8Bitͷ੔਺Ͱද͢ɹ255,67,109 ɾfloatܕͷදݱʢ0~1ʣɹ1.0,0.2,0.43 ɹˢAndroid OͰѻ͑ΔΑ͏ʹʂ RGB

  20. ‹ › 20 ɾՄࢹྖҬͷதͰɺ͞Βʹಛఆͷ৭ͷൣғΛఆ Ίͨ΋ͷ ɾ࠶ݱͰ͖Δ৭Ҭ͸σόΠεͷΑͬͯҟͳΔ ɾಉ͡ΧϥʔεϖʔεͰఆٛ͞Εͨ৭Ͱ΋৭Ҭͷ ҧ͍Ͱશ͘ҧ͏৭ʹͳΔ ɾ sRGB͕ඪ४తͳ৭Ҭͱͯ͠ఆண͍ͯ͠Δ

    Color Space Color space (https:/ /en.wikipedia.org/wiki/Color_space)
  21. What you saw is how Android handles color space Colors

    are unmanaged
  22. Android O Color Management W

  23. ‹ › 23 // Color instance in sRGB Color color

    = Color.valueOf(1.0f, 0.26f, 0.43f); // Color instance in Abode RGB Color ab = Color.valueOf(1.0f, 0.26f, 0.43f, 1.0f, ColorSpace.get(ColorSpace.Named.ADOBE_RGB)); // From Adobe RGB to Display P3 Color p3 = ab.convert( ColorSpace.get(ColorSpace.Named.DISPLAY_P3)); Android O Color Management
  24. ‹ › 24 // RGB in Adobe RGB @ColorLong long

    c = Color.pack(1.0f, 0.26f, 0.43f, 1.0f, ColorSpace.get(ColorSpace.Named.ADOBE_RGB)); ColorSpace cs = ColorSpace.get(ColorSpace.Named.ADOBE_RGB); cs.isWideGamut(); // Returns true cs.getModel(); // Return ColorSpace.Model.RGB Android O Color Management
  25. ‹ › 25 // Use connectors for conversions ColorSpace.Connector c

    = ColorSpace.connect( ColorSpace.get(ColorSpace.Named.SRGB), ColorSpace.get(ColorSpace.Named.ADOBE_RGB) ); float[] adbeRGB = c.transform(1.0f, 0.26f, 0.43f); // Change the white point with chromatic adaption ColorSpace d50 = ColorSpace.adapt( ColorSpace.get(ColorSpace.Named.SRGB), ColorSpace.ILLUMINANT_D50 ); Android O Color Management
  26. ‹ › 26 ɾϏοτϚοϓʹຒΊࠐ·Εͨ৭ҬΛαϙʔτ ɾϚχϑΣετʹ޿৭ҬͷΧϥʔϞʔυΛѻ͏ϑϥά௥Ճ ɾ޿৭ҬσΟεϓϨΠͷϦιʔε۠෼௥Ճ res/ *-widecg ɾConfigrations΍DisplayΠϯελϯεʹ޿৭ҬσΟεϓϨΠ൑ఆϝιου௥Ճ Others

  27. ‹ › 27 ˎͲͷΑ͏ʹඳը͞ΕΔ͔ͱ͍͏ϓϩηεʹհೖͰ͖ΔΘ͚Ͱͳ͍ ɾΩϟϦϒϨʔγϣϯ͞ΕͨσΟεϓϨΠͰಈ࡞Λ֬ೝ͠Α͏ ɾͪΌΜͱsRGBͰ֬ೝ͠Α͏ʢOͷ։ൃऀΦϓγϣϯʹsRGBϞʔυػೳ௥Ճʣ ɾը૾ϑΝΠϧʹ৭Ҭ৘ใ(ΧϥʔϓϩϑΝΠϧ)ؚ͕·Ε͍ͯΔ͜ͱΛ֬ೝ͠Α͏ Important

  28. ‹ › 28 ɾUnderstanding Color (Google I/O '17) https:/ /youtu.be/r8NeG0wmFXM

    References
  29. via@keynote.com +44 0 746 987 Launchit Followers Callus Thank you

    for your attention.