HTML Color Codes and Converting RGB to Hexadecimal HTML顏色守則和轉換為十六進制的RGB

Advertisements廣告

When I當我 redesigned重新設計 my blog, I wanted my我的博客,我想我的 Adsense的Adsense unit to merge properly with the background of the theme.單位合併妥善的背景主題。 My earlier theme had white background, so it was never a problem to integrate the ads.我剛才的主題了白色的背景,所以這是從來沒有的問題,將廣告。 The sidebar of my new theme has a unique color and I wanted the background of my Adsense unit to have the same color.該欄我的新主題,具有獨特的顏色和我想的背景下,我國AdSense單元具有相同的顏色。 Adsense setup has only a small collection of colors (although we can manually enter the colors). AdSense設置了只有一小收集的顏色(儘管我們可以手動輸入的顏色) 。 I didn’t have Photoshop or a GIMP installed in my system (office computer from where I blog).我沒有Photoshop或1頁安裝在我的系統(辦公電腦從我的博客) 。 Now the question is how to get the correct color code when you don’t have any picture editors?現在的問題是如何獲得正確的顏色代碼時,你沒有任何圖片編輯?

This is pretty simple!這是很簡單! I took screen shot of my blog and pasted in paint.我把畫面我的博客並粘貼塗料。 Using the color picker, I selected the color of my sidebar.用顏色挑選器,我選擇的顏色我的側欄。 Now paint displays color in RGB format and I wanted it in hexadecimal format.現在,塗料顏色顯示RGB格式,我想它在十六進位格式。 My color was RGB (216, 217, 198).我的顏色的RGB ( 216 , 217 , 198 ) 。 HTML colors codes are made up of 3 sets of hex numbers, one for Red, one for Green, and one for Blue and to get the color code in hexadecimal format is very simple.顏色的HTML代碼是由3套十六進制數字,一個紅色,一個綠色,一個藍色,並獲得顏色代碼在十六進位格式非常簡單。

Here the calculator that comes with Windows is handy, to convert between Decimal and Hex values.這裡的計算器來與Windows方便,轉換之間的十進制和十六進制值。 Open the calculator and select View and then Scientific.打開計算器,選擇查看,然後科學。 Once you do this, you’ll see more buttons and controls on the calculator.一旦你做到這一點,你會看到更多的按鈕和控制計算器。 Click “Dec” and the key in a number (the number that is specific to red).點擊“ 12月” ,關鍵在一個號碼(該號碼,具體為紅色) 。 Now click “Hex” and it’ll convert the number to hex.現在,點擊“六角” ,它會轉換為十六進制數。 To convert from Hex to Dec, click on “Hex”, key in the number, and then click “Dec”.要轉換從六角至12月,點擊“六角” ,關鍵在數量,然後點擊“ 12月” 。 Sometimes you’ll get a color specification in Decimal, for example (128, 30, 80) and you can use this method to convert it to hex (80, 1E, 50) which would look like this for your HTML color #801E50.有時候,你會得到一種顏色規格的十進制,如( 128 , 30 , 80 ) ,您可以使用此方法將它轉化成十六進位( 80 , 1E , 50 )這看起來您的HTML顏色# 801E50 。 ( Imp: Don’t key in all the three numbers and convert to hexadecimal, this would give a different combination) The decimal part for a color varies from 0-255 and we can have different combinations by varying this RGB combination.進出口:不要在所有關鍵的三個電話號碼,並轉換為十六進制,這將給不同的組合)的小數部分的顏色不同, 0-255 ,我們可以有不同的組合不同這三原色的組合。

Here are some of the common colors and their decimal and hexadecimal codes.以下是一些常見的顏色和它們的十進制和十六進制代碼。

000000 is black (0’s for all three colors) 000000是黑色( 0的所有三種顏色)
FFFFFF is white (255’s for all three colors) FFFFFF是白色的( 255的所有三種顏色)
FF0000 is all RED (255 for Red, 0 green, 0 blue) FF0000是紅色( 255的Red , 0綠色,藍色0 )
00FF00 is all GREEN (0 Red, 255 green, 0 blue) 00FF00是所有綠色( 0紅, 255綠,藍0 )
0000FF is all Blue (0 red, 0 green, 255 blue) 0000FF是藍( 0紅色, 0綠色,藍色255 )
FFFF00 is Yellow (255 red, 255 green, and 0 blue) FFFF00是黃河( 255紅, 255綠,藍0 )
808080 is a gray (128 red, 128 green, and 125 blue)八十萬八千零八十〇是灰色的( 128紅, 128綠, 125藍)

Next time when you face this issue, try our this method.下一次當你面對這一問題,我們嘗試這種方法。 There is a small software (62 kb),有一個小軟件( 62 kB的) , Pixie小精靈 , which will tell you the Hex, RGB, HTML, CMYK and HSV values of any color. ,這將告訴你,六角,三原色, HTML格式, CMYK和HSV價值的任何顏色。

Technorati tags: Technorati的標籤: , ,

Share this Post分享這個郵報

StumbleUpon公司- 4848.pngDigg的- 4848.pngTechnorati的- 4848.png供稿- 4848.png美味- 4848.png

Comments評論

  • Rishi Rishi said: 說:

    Hey thanks!嘿謝謝! I was searching a reference for this from a long time.我是搜索範圍從很長一段時間。 : )

  • Silki Silki said: 說:

    Hi Nirmal,您好Nirmal ,
    I think there is a very simple tool called “Color Cop” available exactly for the same purpose.我認為是一個非常簡單的工具,所謂的“彩色警探”完全可以為同樣的目的。 You can download it at您可以下載它 http://www.colorcop.net . It will not take more than 5 seconds (yes 5 seconds) to determine the hex colour code of any pixel on your screen.它不會超過5秒(是5秒) ,以確定十六進制顏色代碼的任何像素在屏幕上。 The use is extremely easy.使用非常簡單。
    I am a total new entrant to the blogosphere and had just shot off my blog webtools-desinet1.blogspot.com.我總新加入者的博客和剛剛槍殺了我的博客webtools - desinet1.blogspot.com 。 I have not even finished its template part.我還沒有完成其模板的一部分。
    I would love to hear from you.我希望聽到您的意見。

  • nirmaltv nirmaltv said: 說:

    @Rishi, @ Rishi ,
    Thanks for your feedback, hope it was useful for you.感謝您的意見,希望它是有用的你。

    @Silki, @ Silki ,
    Thanks for letting me know about the software.感謝讓我知道該軟件。 I have also mentioned about another software Pixie, which can convert to all formats.我還提到了另一個軟件小精靈,它可以轉化為各種格式。


Add a comment添加評論

Translate Page網頁翻譯

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanПереведите к русскому/RussianΜεταφράστε στα ελληνικά/GreekVertaal aan het Nederlands/Dutchترجمة الى العربية/Arabic中文翻译/Chinese Traditional
中文翻译/Chinese Simplified한국어에게 번역하십시오/Korean日本語に翻訳しなさい /JapaneseTraduza ao Português/PortugueseTraduca ad Italiano/ItalianTraduisez au Français/FrenchTraduzca al Español/Spanish
Nirmal is a Software Engineer and Technology Blogger. Nirmal是一個軟件工程師和技術的Blogger 。 He is a Microsoft Most Valuable Professional in Windows Desktop Experience.他是微軟最有價值專家在Windows桌面體驗。
mvp印度技術博客