灰色邊框陰影_50種暗模式灰色陰影

灰色邊框陰影

If you’re an avid dark mode user like me, you’ll know that dark mode isn’t just about white text on black backgrounds. In a single app, a handful of shades of gray give the app some depth. And across various apps, the spectrum of gray becomes even wider.

如果您是像我這樣的狂熱暗模式用戶,您會知道暗模式不只是黑底白字。 在單個應用程序中,少量的灰色陰影為應用程序提供了一定的深度。 在各種應用程序中,灰度范圍變得更廣。

I was curious about the dark mode apps and sites I use. Through inspecting elements and getting the hex codes of colors from a screenshot, I analyzed the dark mode palettes of 6 popular apps.

我對我使用的暗模式應用程序和網站感到好奇。 通過檢查元素并從屏幕快照中獲取顏色的十六進制代碼,我分析了6種流行應用程序的暗模式調色板。

RGB色彩空間 (RGB Color Space)

RGB (RGB)

To talk about colors, we should start with how colors can be represented digitally.

要談論顏色,我們應該從如何以數字表示顏色開始。

The RGB color space is one of the most popular models. Each color is a combined weight of the three colors red, green, and blue. The weight ranges from 0 (least) to 255 (most) and is usually displayed in a triplet: (red weight, green weight, blue weight). For example, red would be (255, 0, 0) since pure red has no traces of green or blue. A deep eggplant purple is (128, 0, 128) with equal parts red and blue. We also have black which is a lack of color: (0, 0, 0) and white, all the colors: (255, 255, 255).

RGB顏色空間是最受歡迎的模型之一。 每種顏色是紅色,綠色和藍色三種顏色的總和。 權重的范圍從0(最小)到255(最大),通常以三元組顯示:( (red weight, green weight, blue weight) 。 例如,紅色將為(255, 0, 0)因為純紅色沒有綠色或藍色的痕跡。 茄子深紫色是(128, 0, 128) ,紅色和藍色相等。 我們也有黑色,缺少顏色: (0, 0, 0)和白色,所有顏色: (255, 255, 255)

We can also visualize the RGB color space as a cube with red, green, and blue as the axis. Every color can be “plotted” in this cube.

我們還可以將RGB顏色空間可視化為以紅色,綠色和藍色為軸的立方體。 每種顏色都可以在此多維數據集中“繪制”。

What we’re interested in are the colors along and around the grayscale line. In this RGB cube, the grayscale line extends from black to white. Every color on this line has the same value for red, green, and blue. For example, medium gray is (127, 127, 127) and is the midpoint of the grayscale line. The closer to 0 the values are, the darker the shade of gray since black is (0, 0, 0).

我們感興趣的是沿著灰度線及其周圍的顏色。 在此RGB立方體中,灰度線從黑色延伸到白色。 該行上的每種顏色的紅色,綠色和藍色具有相同的值。 例如,中等灰度是(127, 127, 127) ,它是灰度線的中點。 值越接近0,因為黑色是(0, 0, 0)所以灰色陰影越深。

Image for post
Grayscale line from black to white
灰度線從黑到白

Colors that surround the grayscale line are not pure gray, but rather slightly tinted. For example, Twitter uses (25, 39, 52). Notice how even though the values are close to each other, the blue value is the largest. Thus, this shade of gray is a bit blue.

圍繞灰度線的顏色不是純灰色,而是略帶色。 例如,Twitter使用(25, 39, 52) 。 請注意,即使兩個值彼此接近,藍色值也是最大的。 因此,這種灰色陰影有點藍色。

十六進制代碼 (HEX Codes)

To digitize this RGB triplet, we have HTML (Hex) color codes. HTML, CSS, SVGs, and more use hex codes to represent colors. The name comes from how Hex codes are just the concatenation of RGB values in hexadecimal. Sometimes we precede a Hex code with a pound sign. If we convert the aforementioned colors to Hex, we have:

為了數字化此RGB三元組,我們有HTML(十六進制)顏色代碼。 HTML,CSS,SVG等使用十六進制代碼表示顏色。 該名稱來自十六進制代碼如何只是十六進制十進制數的RGB值的串聯。 有時,我們在十六進制代碼前加井號。 如果將上述顏色轉換為十六進制,我們將:

  • Red: (255, 0, 0) → #ff0000

    紅色: (255, 0, 0) → #ff0000

  • Eggplant purple: (128, 0, 128) → #800080

    茄子紫色: (128, 0, 128) → #800080

  • Black: (0, 0, 0) → #000000

    黑色: (0, 0, 0) → #000000

  • Medium gray: (127, 127, 127) → #7f7f7f

    中灰: (127, 127, 127) → #7f7f7f

  • White: (255, 255, 255) → #ffffff

    白: (255, 255, 255) → #ffffff

  • Twitter blue-gray: (25, 39, 52) → #192734

    Twitter藍灰色: (25, 39, 52) → #192734

Now that we know a bit about RGB and Hex representations, we can explore the world of dark mode.

現在我們對RGB和十六進制表示有所了解,我們可以探索黑暗模式的世界。

暗模式應用程序剖析 (Anatomy of a Dark Mode App)

Across my analysis of various apps and sites, I’ve noticed a some general patterns that most dark mode apps follow.

在對各種應用程序和網站的分析中,我注意到大多數暗模式應用程序遵循的一些常規模式。

Image for post

背景 (Background)

As the most dominant color, the background is almost always the darkest. It’s never pure black — usually a couple of shades lighter.

作為最主要的顏色,背景幾乎總是最暗。 它永遠不會是純黑色的-通常會變淺一些陰影。

菜單欄 (Menu Bar)

These can be found on the side (usually left) or at the top of the app. Menu bars help with app navigation and are lighter than the background color.

這些可以在應用程序的側面(通常是左側)或頂部找到。 菜單欄有助于應用程序導航,并且比背景色淺。

(Card)

With the rise of Material Design, comes the concept of cards. These elements compartmentalize the site content and are lighter gray as well.

隨著Material Design的興起,出現了卡片的概念。 這些元素將站點內容分隔開,并且也呈淺灰色。

分頻器 (Divider)

Some cards have dividers to break up the content. Dividers are even lighter still.

某些卡具有分隔符以分解內容。 分頻器甚至更輕。

紐扣 (Button)

Buttons invoke actions and can be gray or the app’s accent color.

按鈕可以調用操作,可以是灰色或應用的配色。

主要文字 (Primary Text)

The titles and headers. Primary texts are the lightest color on the site, usually very close to white.

標題和標題。 主要文字是網站上最淺的顏色,通常非常接近白色。

次要文字 (Secondary Text)

Secondary texts are smaller in font size and a bit darker than their primary counterparts.

次要文本的字體較小,但比主要文本要暗一些。

圖標 (Icon)

Representing ideas without words, icons are light as well and sometimes are accompanied by secondary text.

代表想法但不帶文字,圖標也很亮,有時還帶有輔助文字。

These are some characteristics many modern dark mode apps share! Now we’ll examine how these elements apply to popular apps.

這些是許多現代黑暗模式應用程序共享的一些特征! 現在,我們將研究這些元素如何應用于流行的應用程序。

Spotify(macOS應用) (Spotify (macOS App))

Image for post
From left to right: background, menu bar, top gradient, bottom gradient, primary text, secondary text從左到右 :背景,菜單欄,頂部漸變,底部漸變,主要文字,次要文字

Spotify is the earliest app I remember that only had dark mode. It didn’t start out this way. After undergoing a major redesign in 2014, the streaming service forced the dark theme on all its users. The argument for the switch was as such: the dark background allows for colorful album art to pop, akin to theaters dimming their lights for shows.

我記得Spotify是最早的應用, 只有暗模式。 它不是以這種方式開始的。 在2014年進行了重大的重新設計之后,流媒體服務對所有用戶施加了黑暗的主題。 切換的理由是這樣的 :黑暗的背景允許彈出多彩的專輯封面,類似于劇院調暗燈光進行演出。

Indeed, the colorful album covers contrast with the dark app, and make them appear brighter than they would on a white background:

實際上,彩色專輯涵蓋了與深色應用程序的對比,并使它們顯得比白色背景明亮:

Image for post
Bright colors pop
鮮艷的色彩流行

Spotify is also the only app I’ve noticed that uses a gradient for the main background. Referencing the palette, the background ranges from #404040, a much lighter gray, to #181818, almost black. My theory is also that users spend the most time looking at playlist pages:

Spotify也是我注意到的唯一使用漸變作為主要背景的應用程序。 參考調色板,背景的范圍是從#404040 (淺得多的灰色)到#181818 (幾乎是黑色)。 我的理論還在于,用戶花費最多的時間在播放列表頁面上:

Image for post

Here, the gradient makes sense for a long list of items, almost imitating motion. On non-playlist pages, the gradient also provides some depth.

在這里,漸變適用于一長串項目,幾乎可以模仿運動。 在非播放列表頁面上,漸變也會提供一定的深度。

Additional comments:

補充說明

  • The primary text is pure white, and the secondary text is a light gray — pretty standard

    主要文字為純白色,次要文字為淺灰色-非常標準
  • Every color is a pure shade of gray, no tints

    每種顏色都是純灰色陰影,沒有色彩
  • The accent color (green) is subtly used to break up the shades of gray

    強調色(綠色)巧妙地用于分解灰色陰影

Twitter(網絡) (Twitter (Web))

Image for post
From left to right: background, card, hover color, primary text, secondary text從左到右 :背景,卡片,懸停顏色,主要文本,輔助文本

Right off the bat, just by looking at the RGB values, Twitter heavily favors blue for its dark mode. For each of the shades, the blue value is the highest.

馬上,僅通過查看RGB值,Twitter就非常喜歡藍色作為其黑暗模式。 對于每種陰影,藍色值為最高。

Image for post

Since its logo/accent color is blue, the blue-ness of the dark mode isn’t surprising and goes well together. As with any app that uses blue as its identifying color, Twitter hopes that this color choice conveys trust and tranquility.

由于其徽標/重點顏色是藍色,因此暗模式的藍色不足為奇,并且可以很好地搭配使用。 與使用藍色作為其識別顏色的任何應用程序一樣,Twitter希望這種顏色選擇能夠傳達信任和寧靜。

Additional comments:

補充說明

  • Twitter utilizes cards with dividers. The cards are lighter than the background to appear closer, giving a perception of depth.

    Twitter利用帶分隔符的卡片。 卡片比背景更輕,看起來更近,給人以深度感。
  • The dividers on the cards are a lighter shade of blue

    卡上的分隔線為淺藍色
  • Primary text is pure white and secondary text is light blue

    主要文字為純白色,次要文字為淺藍色
  • Blue accent color used throughout

    貫穿始終使用的藍色配色
  • Logo is icon-like and is white

    徽標像圖標,是白色的

臉書(網頁) (Facebook (Web))

Image for post
From left to right: background, card, hover color, primary text, secondary text從左到右 :背景,卡片,懸停顏色,主要文本,輔助文本

Facebook’s dark mode color decisions are interesting. If you look at the Hex codes, none of the colors are on the grayscale line. Instead, each RGB value is close to each other, slightly increasing from red to green to blue. It’s so subtle that it’s virtually unnoticeable when using the app:

Facebook的深色模式色彩決定很有趣。 如果您查看十六進制代碼,則沒有任何顏色在灰度線上。 相反,每個RGB值彼此接近,從紅色到綠色再到藍色略有增加。 它是如此的微妙,以至于在使用該應用程序時幾乎看不到它:

Image for post

The colors might as well be grayscale colors.

顏色也可以是灰度顏色。

Additional comments:

補充說明

  • Facebook also uses lighter cards

    Facebook還使用打火機卡
  • Lighter dividers are used on left and right menu bars

    左右菜單欄上使用了較輕的分隔線
  • The primary text is not white, instead of a shade of very light gray

    主要文字不是白色,而是非常淺的灰色陰影
  • The icons on the top right are this off-white as well, encased by gray button circles while the icons on the top are a darker shade of gray. The icons on the left menu are colorful instead

    右上方的圖標也是灰白色,由灰色按鈕圓圈包圍,而頂部的圖標則是較深的灰色陰影。 左側菜單上的圖標改為彩色的

YouTube(網頁) (Youtube (Web))

Image for post
From left to right: background, menu , hover color, primary text, secondary text從左到右 :背景,菜單,懸停顏色,主要文本,輔助文本

The dark mode palette used by YouTube is almost uninteresting. Each shade of gray is exactly on the grayscale lines. Unlike the apps above, there doesn’t seem to be an accent color. You don’t see the YouTube red anywhere in the app except the logo in the top left.

YouTube使用的深色模式調色板幾乎沒有意思。 每個灰色陰影正好位于灰度線上。 與上面的應用程序不同,似乎沒有強調色。 除了左上方的徽標,您在應用中的任何地方都看不到YouTube紅色。

Image for post

中(iOS應用) (Medium (iOS App))

Image for post
From left to right: background, menu bars, primary text, secondary text從左到右 :背景,菜單欄,主要文本,輔助文本

If Medium didn’t have dark mode, I most definitely wouldn’t use the app every night before bed 😅 Much like its plain logo of black and white, Medium’s iOS app’s dark mode colors are super simple. In my opinion, this simplicity works well for a publishing platform — it’s reminiscent of old-fashioned newspapers.

如果Medium沒有深色模式,那么我絕對不會每天晚上睡前使用該應用程序Medium非常類似于其黑白徽標,Medium的iOS應用程序的深色模式顏色非常簡單。 我認為,這種簡單性對于發布平臺非常有效-讓人聯想到老式報紙。

Additional comments:

補充說明

  • The background color is the darkest we’ve seen so far, almost pure black

    背景顏色是迄今為止我們所見過的最暗的顏色,幾乎是純黑色
  • Medium uses its green accent color throughout the app as well

    在整個應用程序中,Medium也會使用其綠色的配色

蘋果 (Apple)

蘋果手機 (iPhone)

Image for post
From left to right: background, card (Settings), card (iMessage), primary text, secondary text從左到右 :背景,卡片(設置),卡片(iMessage),主要文本,輔助文本

Dark mode for the iPhone can be seen in the native Apple apps such as Settings, iMessage, Notes, Photos, etc. Apps that you download can also recognize that you’ve set your iPhone to dark mode and adjust their theme automatically.

在本機Apple應用程序(例如“設置”,“ iMessage”,“便箋”,“照片”等)中可以看到iPhone的暗模式。您下載的應用程序還可以識別出您已將iPhone設置為暗模式并自動調整其主題。

Additional comments:

補充說明

  • Unlike all the apps before, the iPhone dark mode uses pure black for the background

    與以前的所有應用程序不同,iPhone暗模式將純黑色用作背景
  • The card colors favor blue. Like Facebook, the blue tint is pretty much unnoticeable

    卡的顏色偏愛藍色。 像Facebook一樣,藍色色調幾乎不引人注目

蘋果電腦 (Mac)

Now, this is where it gets interesting. Apple actually makes the backgrounds of native Mac apps transparent — but transparent relative to your desktop wallpaper, not whatever is currently open under the app. Thus, there is no decisive palette of colors since wallpapers vary.

現在,這才變得有趣。 蘋果實際上使本機Mac應用程序的背景透明-但相對于您的桌面墻紙是透明的,而不是該應用程序下當前打開的任何內容。 因此,由于墻紙不同,因此沒有決定性的調色板。

However, MacOS does have elements of a typical dark mode app: menu bars, cards, primary/secondary text, etc. Besides the transparent background (which is a really cool touch; I encourage you to explore this for yourself), the MacOS dark mode is predictable.

但是,MacOS確實具有典型的黑暗模式應用程序的元素:菜單欄,卡片,主要/次要文本等。除了透明背景(這確實很酷;我鼓勵您親自研究一下)之外,MacOS Dark模式是可預測的。

結論 (Conclusion)

If you ever thought that all dark mode apps are starting to look the same, you’re not wrong. They share the common elements we learned about: Usually a dark, almost black, background color, with lighter menu bars lining the top and/or sides; even lighter, rounded-corner cards section content, and seem to appear closer because of the color contrast; accent color jellybean buttons, a bright white primary text, and smaller slightly darker secondary text… All the apps blend together.

如果您曾經以為所有暗模式應用程序看起來都一樣,那您就沒錯。 它們具有我們了解到的共同要素:通常是深色,近乎黑色的背景色,頂部和/或側面襯有較淺的菜單欄; 甚至更淺,更圓角的卡片部分內容,并且由于顏色對比而顯得更近; 帶有彩色軟糖按鈕,明亮的白色主文本和較小的較暗的輔助文本……所有應用程序融合在一起。

That being said, there are still ways to slightly deviate from this template. We saw Spotify’s gradient, Twitter’s blue-hued shades, and MacOS’s opaque background. If you’re designing a dark mode app, I encourage you to find ways to subtly stand out. After all, we could use some variety…and more shades of gray.

話雖如此,仍然有一些方法可以稍微偏離此模板。 我們看到了Spotify的漸變色,Twitter的藍色陰影和MacOS的不透明背景。 如果您要設計黑暗模式的應用程序,我鼓勵您找到巧妙地脫穎而出的方法。 畢竟,我們可以使用各種顏色……以及更多的灰色陰影。

Thanks for reading!

謝謝閱讀!

翻譯自: https://codeburst.io/50-shades-of-dark-mode-gray-d3e9907b1194

灰色邊框陰影

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/274979.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/274979.shtml
英文地址,請注明出處:http://en.pswp.cn/news/274979.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Android源代碼下載

為什么80%的碼農都做不了架構師?>>> Android代碼使用git管理, 所以關于Android源碼下載一般來說要安裝git. 本文是講述只使用Eclipse完成Android源碼下載和關聯. 下載Eclipse,目前最新版本是Juno,自帶了EGit插件-->Eclipse Git插件 那么可以使用EGit…

關于nginx調轉404錯誤頁面

在server{}模塊添加如下: error_page 404 /404.html; location /404.html { root /var/www/html/sina/; #“404目錄地址” }轉載于:https://www.cnblogs.com/alang85/archive/2012/03/01/404_error.html

尤雨溪:Vue 3 將成為新的默認版本

過完年,大年初七,Vue3 將成為默認版本,這時感覺我之前寫的幾篇文章都可以抽空更新一版了。尤雨溪推薦神器 ni ,能替代 npm/yarn/pnpm ?簡單好用!源碼揭秘!Vue 3.2 發布了,那尤雨溪是…

shell編程系列20--文本處理三劍客之awk常用選項

shell編程系列20--文本處理三劍客之awk常用選項awk選項總結選項 解釋 -v 參數傳遞 -f 指定腳本文件 -F 指定分隔符 -V 查看awk的版本號[rootlocalhost shell]# awk -v num2"$num1" -v var1"$var" BEGIN{print num2,var…

v-charts加載動畫_加載動畫-用戶體驗寫作練習

v-charts加載動畫Many new UX writers often struggle to find the balance between creativity and clarity. You can’t make everything fun/exciting/interesting as it can have an adverse effect on usability. But there are times when you can add a bit of flair.許…

linux 常用命令收集

關機:poweroff,shutdown -h now,init 0重啟:reboot,shutdown -r now,init 6 關閉x-window:init 3啟動x-window:init 5,start x1.終止命令:ctrlc 2.結束輸入…

34歲回顧人生,也怕中年危機!

大家好,我是若川。持續組織了5個月源碼共讀活動,感興趣的可以點此加我微信 ruochuan12 參與,每周大家一起學習200行左右的源碼,共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。最近發生一件令人感…

蛋花花APP,APP開發這幾點你要注意了

蛋花花君又來了,這次蛋花花君為大家分享的是APP開發過程中需要注意的幾點。 1、用戶體驗 程序猿蛋花花覺得,APP開發是為客戶來開發的,而不單單是為了老板,畢竟真正使用的是廣大用戶。APP的設計應該從用戶的角度出發,提…

svg動畫制作_制作第一個SVG動畫

svg動畫制作Story of a designer trying to code animations instead of asking a dev to figure it out.一位設計師嘗試編寫動畫代碼而不是要求開發人員弄清楚動畫的故事。 編碼動畫是Webdesign的未來 (Coded animations are the future of Webdesign) Because we have acces…

網站前端設計,從960框架開始

一個網站進入到前端設計階段,第一步肯定是為全站搭建一個統一的,基礎的HTML模型,在這里推薦一下我剛學習的960框架。960是一個CSS框架,你肯定在想,這個世界肯定是瘋了,連CSS都有框架了嗎,沒錯&a…

60+ 實用 React 工具庫,助力你高效開發!

大家好,我是若川。持續組織了5個月源碼共讀活動,感興趣的可以點此加我微信 ruochuan12 參與,每周大家一起學習200行左右的源碼,共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。最近看到一些實用的…

2012年12月第二個周末

2019獨角獸企業重金招聘Python工程師標準>>> 這周,裝上了windows版的 Linux版的oracle 熟悉了下SQL*PLUS的編程規則,還有常用的linux命令 看了一本《簡愛》 正在看oracle 轉載于:https://my.oschina.net/u/204616/blog/545513

『C#基礎』調用CMD的一個小工具

由于經常要使用CMD的一些命令,比如查看IP,Ping一個網址之類的。于是就寫了一個調用CMD.exe的小工具。 主要就是實現這樣一個事情:調用CMD.exe然后傳給它我想要執行的命令,最后獲取結果。 界面: 代碼: 主要執…

小姐姐:如何參與大型開源項目-Taro 共建

大家好,我是若川。持續組織了5個月源碼共讀活動,感興趣的可以點此加我微信 ruochuan12 參與,每周大家一起學習200行左右的源碼,共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。“本文來自前端程序…

JavaWeb學習總結(十七)——JSP中的九個內置對象

2019獨角獸企業重金招聘Python工程師標準>>> 一、JSP運行原理 每個JSP 頁面在第一次被訪問時,WEB容器都會把請求交給JSP引擎(即一個Java程序)去處理。JSP引擎先將JSP翻譯成一個_jspServlet(實質上也是一個servlet) ,然…

C#網絡編程(異步傳輸字符串) - Part.3[轉自JimmyZhang博客]

源碼下載:http://www.tracefact.net/SourceCode/Network-Part3.rar C#網絡編程(異步傳輸字符串) - Part.3 這篇文章我們將前進一大步,使用異步的方式來對服務端編程,以使它成為一個真正意義上的服務器:可以為多個客戶端的多次請求…

chrome黑暗模式_黑暗模式:如何克服黑暗面

chrome黑暗模式This article has been written by Redmadrobot Design Lab. Translated and reposted with permission by Alconost Inc., professional translation and localization company.本文由 Redmadrobot設計實驗室 撰寫 。 經過 專業翻譯和本地化公司 Alconost Inc.的…

Deco 智能代碼體驗版正式上線啦,快來體驗設計稿一鍵生成代碼~

Deco 是什么?—Deco 智能代碼項目是我們團隊在「前端智能化」方向上的探索,其聚焦設計稿一鍵生成多端代碼這一切入點,實現將 Sketch/Photoshop 等設計稿進行解析并直接生成多端代碼(Taro/React/Vue)的能力。Deco 可以使…

jQuery 五角星評分

五角星打分 我用的是搜狗輸入法上帶的特殊符號打出來的 空五角星&#xff1a;☆ 實五角星&#xff1a;★ 1.html 1 <ul class"comment"> 2 <li>☆</li> 3 <li>☆</li> 4 <li>☆</li> 5 …

平面設計和網頁設計的規則_從平面設計到用戶界面:這是您應該知道的最重要的規則

平面設計和網頁設計的規則Maybe you’re here because you think UI Design is the future of Graphic Design. Maybe what motivates you is the money. Or maybe you just woke up one day and someone at work told you “So, you are a designer, right? Well, we need an…