版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、RGB轉(zhuǎn)Lab的VB代碼在網(wǎng)上搜索了很久,也沒有看到用VB寫的RGB轉(zhuǎn)Lab的代碼,現(xiàn)根據(jù)網(wǎng)上通用的轉(zhuǎn)換算法改寫成VB代碼(轉(zhuǎn)換后與CIE-Lab的標(biāo)準(zhǔn)色卡有差異,附色卡Lab與RGB對(duì)照表),希望能拋磚引玉。代碼如下:RGB轉(zhuǎn)LabSub RGB_Lab(R1, G1, B1 As Long, L, A, B As Currency) R1,G1,B1為顏色三分量值,先賦值 Dim R2, G2, B2, X1, Y1, Z1 As Currency R2 = R1 / 255 G2 = G1 / 255 B2 = B1 / 255 'If R2 > 0.04045 Then
2、R2 = (R2 + 0.055) / 1.055) 2.4 Else R2 = R2 / 12.92 'If G2 > 0.04045 Then G2 = (G2 + 0.055) / 1.055) 2.4 Else G2 = G2 / 12.92 'If B2 > 0.04045 Then B2 = (B2 + 0.055) / 1.055) 2.4 Else B2 = B2 / 12.92 R2 = R2 / 12.92 G2 = G2 / 12.92 B2 = B2 / 12.92 X1 = R2 * 0.412453 + G2 * 0.35758 + B2
3、 * 0.180423 Y1 = R2 * 0.212671 + G2 * 0.71516 + B2 * 0.072169 Z1 = R2 * 0.019334 + G2 * 0.119193 + B2 * 0.950227 X1 = X1 / 0.95047 Y1 = Y1 / 1 Z1 = Z1 / 1.08883 If Y1 > 0.008856 Then L = 116 * (Y1 (1 / 3) - 16 Else L = 903.3 * Y1 If X1 > 0.008856 Then X1 = X1 (1 / 3) Else X1 = 7.787 * X1 + 0.1
4、37931 If Y1 > 0.008856 Then Y1 = Y1 (1 / 3) Else Y1 = 7.787 * Y1 + 0.137931 If Z1 > 0.008856 Then Z1 = Z1 (1 / 3) Else Z1 = 7.787 * Z1 + 0.137931 A = 500 * (X1 - Y1) B = 200 * (Y1 - Z1)End Sub主程序調(diào)用RGB_Lab 后,返回Lab值,序號(hào)PANTONENO色樣LABCMYK配方RGB值L亮度A洋紅-綠B黃-藍(lán)C青M洋紅Y黃K黑R紅G綠B藍(lán)RGB色碼1100C93-85000510243237
5、134#F3ED862101C92-9660079024523698#F5EC623102C91-71000010002502300#FAE6004103C7109100100182021730#CAAD005104C62-17400100301721500#AC96006105C48-149001005112911420#8172147106C91-6650072024623197#F6E7618107C90-4810079025022647#FAE22F9108C880950010002542190#FEDB0010109C865100099402552090#FFD10011110C73
6、7940119462191740#DBAE0012111C61475011100271751430#AF8F0013112C55262011100381531280#99800014113C90-2670669025022590#FAE15A15114C89-2700672025022481#FAE05116115C89-1720979025122274#FBDE4A17116C857930159402552060#FFCE0018117C681083018100152061570#CE9D0019118C60873018100271791380#B38A0020119C50149011100
7、5113811826#8A761A21120C8905306560249223121#F9DF79221205C9003100270243226167#F3E2A723121C8925709690251219110#FBDB6E241215C8914006430245221146#F5DD9225122C8756801883025321279#FDD44F261225C84116901560025319969#FDC74527123C84127903094025519938#FFC726281235C7922850277602551790#FFB30029124C751685027100623
8、51710#EBAB00301245C641369027100181981460#C6920031125C611272023100271871370#BB8900321255C5610590271003417012814#AA800E33126C55860023100341611240#A17C00341265C467460271005113110120#83651435127C89-34606510239223133#EFDF8536128C860610965024221494#F2D65E37129C8436901576024120568#F1CD4438130C7518860271000
9、2411710#F1AB0039131C65198002710092121450#D4910040132C551164023100301661220#A67A0041133C39541018100561338919#71591342134C8754509430248213131#F8D583431345C861039011470251207141#FBCF8D44135C84126101860025420090#FEC85A451355C841345018560253200125#FDC87D46136C81187102779025518858#FFBC3A471365C80216003079
10、025518384#FFB75448137C7532870349102551590#FF9F00491375C7435810387602551540#FF9A0050138C6435830389402281270#E47F00511385C60347404710092141170#D6750052139C542368038100231821130#B67100531395C47215304310038158969#9E620954140C401143027100561228615#7A560F551405C341336038100651087119#6C471356141C8365301147
11、0239200104#EFC86857142C79126402376024118770#F1BB4658143C75197203083023917035#EFAA2359144C65387904710002371280#ED800060145C59317104710092071180#CF760061146C47225603810034159960#9F600062147C39635027100691138833#71582163148C861131011380251208157#FBD09D641485C812642023560255181123#FFB57B65149C8415390185
12、10254198136#FEC688661495C74416503069025515059#FF963B67150C77295903069025516979#FFA94F681505C6756900387602551140#FF720069151C6653860438702551150#FF730070152C61447705110002311110#E76F00711525C50487306510011202780#CA4E0072153C533363043100181921020#C06600731535C38345305110038147630#933F0074154C442650043
13、10034153849#995409751545C21192605110083813811#51260B76155C8742209270236214175#ECD6AF771555C832125018340255191160#FFBFA078156C811234018430239193138#EFC18A791565C783137034510255169125#FFA97D80157C71275203876023715579#ED9B4F811575C70465804372025513466#FF864282158C60476606094023310716#E96B10831585C64577
14、40568702551050#FF690084159C5345610651009205886#CD5806851595C5548640601006218925#DA5C0586160C443348060100341627818#A24E12871605C433547056100301627419#A24A1388161C27182705110069975323#613517891615C353040056100431336016#853C1090162C841921011180253195170#FDC3AA911625C763528030380255162139#FFA28B92163C75
15、3740030470255156113#FF9C71931635C724437038470255142112#FF8E7094164C69505604776025512667#FF7E43951645C65575604760025510859#FF6C3B96165C6361750601000255950#FF5F00971655C606572065870255820#FF520098166C5656700651000229830#E55300991665C5460670691000229720#E54800100167C494456060100181948115#C2510F1011675C
16、414448069100301686015#A83C0F102168C292731056100601114820#6F30141031685C343437069100431345320#863514104169C812714018180255182177#FFB6B1105170C714730038470255137123#FF897B106171C6462520516902559765#FF6141107172C586870065830253713#FD4703108173C51575606910062166925#D84519109174C374241069100381545222#9A3
17、416110175C29272406087651125034#703222111176C79337023150255172185#FFACB91121765C75396043230254157176#FE9DB01131767C79302027110250175194#FAAFC2114177C705219047430255129140#FF818C1151775C704911051300255133154#FF859A1161777C646016060380251101129#FB6581117178C6365340605602559196#FF5B601181785C58693106951
18、02496991#F9455B1191787C5870280766002496695#F9425F1201788C5374470879102403451#F02233121179C5265510799402265640#E238281221795C47684509410002163142#D81F2A1231797C4665380949462083651#D02433124180C45554007683111925444#C0362C1251805C405634091100231763542#B0232A1261807C37502709194301614048#A12830127181C293
19、62507279471213932#7927201281815C284130091100511243330#7C211E1291817C2426120728376943940#5E2728130182C8126002790248184203#F8B8CB131183C72455051230252141169#FC8DA9132184C62621507243024893129#F85D7E133185C507642091760234455#EA0437134186C4569370917662101652#D21034135187C40592809172231792752#B31B34136188
20、C29401507965471243448#7C2230137189C7636-1038110248161190#F8A1BE1381895C8223-403060243188212#F3BCD4139190C67534056230248119158#F8779E1401905C7438-304360245155189#F59BBD141191C56701507638024263114#F23F721421915C6064507215024285138#F2558A143192C507631094650233673#E906491441925C497625094510228080#E40050
21、145193C42662609165111951262#C30C3E1461935C4469230100606203471#CB0447147194C35521609156341563061#9C1E3D1481945C375918010056181701763#AA113F1491955C33511308743301472359#93173B150196C8415-102760235198211#EBC6D3151197C73331047110235155178#EB9BB2152198C5661150793402287711#E44D6F153199C4772320100650219126
22、5#DB0C41154200C42663101006515193453#C10435155201C355322010065341582752#9E1B34156202C314516010065471373252#892034157203C7727-703400235173205#EBADCD158204C6547-606000232123172#E87BAC159205C556510766022769133#E34585160206C4575220100430215077#D7004D161207C38631701004318177066#B10042162208C33486091343814
23、43371#902147163209C2937308334511173865#752641164210C7639-804360250159204#FA9FCC165211C6953-805660249125184#F97DB8166212C5968-50726024378154#F34E9A167213C51764010030023021119#E61577168214C457270100349208099#D00063169215C3860509434271701684#AA1054170216C2842208334471222966#7A1D42171217C8122-1003000236
24、187221#ECBBDD172218C6454-1606500232111184#E86FB8173219C5174-80870022433138#E0218A174220C3766301001818174085#AE0055175221C3258201001834150075#96004B176222C2539-2010015601082563#6C193F177223C7343-1605100242147209#F293D1178224C6459-1906900239106191#EF6ABF179225C5376-170830022935157#E5239D180226C4580-50
25、100002140119#D60077181227C3668-40100023174095#AE005F182228C3053-6094043138783#8A0753183229C2537-508715651062968#6A1D44184230C7836-1403400247167219#F7A7DB185231C6757-2006500245117201#F575C9186232C5873-200790023964176#EF40B0187233C4475-1411100002010129#C90081188234C3663-1261000301660107#A6006B189235C3
26、053-96100043137887#890857190236C7930-1463800242176223#F2B0DF1912365C8420-1003000239195228#EFC3E4192237C6948-2266500238134211#EE86D31932375C6454-28116000226112205#E270CD194238C5965-259760023083188#E653BC1952385C5271-3118830021551180#D733B4196239C5373-2618940022450175#E032AF1972395C4279-30349400196015
27、2#C40098198240C4669-2527940019630153#C41E991992405C3670-284394001670132#A70084200241C3965-222794091724129#AC04812012415C3364-255194001510118#970076202242C2945-129940511222687#7A1A572032425C2855-205110006130099#820063204243C8024-1663000232183229#E8B7E5205244C7533-2193800230162224#E6A2E0206245C6746-28
28、156000223129214#DF81D6207246C4674-3630910019911172#C70BAC208247C4171-363894001830157#B3009D209248C3663-3143940151583137#9E0389210249C3044-19308704712334102#7B2266211250C8218-1461800227192230#E3C0E6212251C7232-26154300217156225#D99CE1213252C5852-38235600202101209#CA65D1214253C4266-4647910016927176#A9
29、1BB0215254C3857-3951940015035153#962399216255C2940-25519103411238108#70266C217256C8014-1392300217191224#D9BFE02182562C7324-26233400207165228#CFA5E42192563C7024-24304300199157216#C79DD82202567C6822-28384300187153218#BB99DA221257C7221-19153800203164212#CBA4D42222572C6435-36345100192132220#C084DC223257
30、3C5933-32476500178121200#B279C82242577C5730-38566000162118204#A276CC225258C4341-3343760014673158#92499E2262582C4851-5047650016276200#A24CC82272583C4643-4060870015380178#9950B22282587C4241-4972790013172181#8348B5229259C2744-326510001510827114#6C1B722302592C3762-5569940014422178#9016B22312593C3548-437
31、91000012643151#7E2B972322597C2450-558710000895141#59058D233260C2437-2560100034952995#5F1D5F2342602C3157-4872100001259150#7D09962352603C2746-41791000610423127#68177F2362607C2046-508710009792124#4F027C237261C2333-2051100047893085#591E552382612C2745-37791000910626122#6A1A7A2392613C2543-3779100011972311
32、6#6117742402617C1941-44871000157511113#4B0B71241262C2126-143894065793472#4F22482422622C2430-217294027873688#5724582432623C2237-3076100030882599#5819632442627C1734-3683100023671895#43125F245263C849-14111500216203235#D8CBEB2462635C7414-25302700191175228#BFAFE4247264C7217-29273000188168230#BCA8E6248264
33、5C6520-35433800170148222#AA94DE249265C5134-51565600141101210#8D65D22502655C5528-46565100145115211#9173D3251266C3546-6494940010350186#6732BA2522665C4437-5679760012282199#7A52C7253267C2541-559494007931145#4F1F91254268C2335-4691940237433126#4A217E2552685C1448-611009400590132#3B0084256269C2225-318794047693899#4526632572695C1724-3210094038592989#381D59258270C728-24302300173172220#ADACDC2592705C6712-33433400162159224#A29FE02602706C822-16181100196203234#C4CBEA2612707C83-2-17271100186208238#BDD0EE2622708C79-1-2134900177197234#B1C5EA263271C6213-344334001481
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024預(yù)制板購銷合同
- 2025年度瓷磚研發(fā)中心實(shí)驗(yàn)室建設(shè)與運(yùn)營合同3篇
- 2025年度危險(xiǎn)化學(xué)品儲(chǔ)存安全管理承包合同4篇
- 2025年度智能物流中心建設(shè)與運(yùn)營管理合同4篇
- 2025年度商業(yè)地產(chǎn)租賃代理服務(wù)合同模板4篇
- 2024物業(yè)項(xiàng)目策劃2024委托代理合同
- 2025年度醫(yī)療器械代生產(chǎn)加工合同范本4篇
- 2025年度特殊用途車牌租賃與押金管理協(xié)議4篇
- 2025年度展會(huì)現(xiàn)場安保及應(yīng)急預(yù)案服務(wù)合同3篇
- 2024鐵路鋼軌鋪設(shè)及維護(hù)工程協(xié)議細(xì)則
- 勞動(dòng)合同續(xù)簽意見單
- 大學(xué)生國家安全教育意義
- 2024年保育員(初級(jí))培訓(xùn)計(jì)劃和教學(xué)大綱-(目錄版)
- 河北省石家莊市2023-2024學(xué)年高二上學(xué)期期末考試 語文 Word版含答案
- 企業(yè)正確認(rèn)識(shí)和運(yùn)用矩陣式管理
- 分布式光伏高處作業(yè)專項(xiàng)施工方案
- 陳閱增普通生物學(xué)全部課件
- 檢驗(yàn)科主任就職演講稿范文
- 人防工程主體監(jiān)理質(zhì)量評(píng)估報(bào)告
- 20225GRedCap通信技術(shù)白皮書
- 燃?xì)庥邢薰究蛻舴?wù)規(guī)范制度
評(píng)論
0/150
提交評(píng)論