├── .gitignore ├── source ├── _Topcoat_IconSet_fw.png ├── Topcoat_IconSetList.fw.png ├── _Topcoat_IconStyle_Guidelines.png ├── _TopCoat_IconSet_andSocialIcons.ai └── _Topcoat_IconStyle_Guidelines_fw.png ├── docs ├── _Topcoat_IconSet_overview.png └── _Topcoat_IconStyle_Guidelines.png ├── font ├── icomatic.css ├── icomatic.js ├── icomatic.svg ├── index.html └── js │ └── dat.color.js ├── svg ├── rectangle.svg ├── rectangle_outline.svg ├── back_light.svg ├── next_light.svg ├── arrow_down.svg ├── arrow_right.svg ├── back.svg ├── next.svg ├── arrow_up.svg ├── arrow_left.svg ├── minus.svg ├── circle.svg ├── roundedrectangle.svg ├── folder.svg ├── page.svg ├── tablet.svg ├── text.svg ├── like.svg ├── phone.svg ├── retweet.svg ├── audiooff.svg ├── share.svg ├── download.svg ├── plus.svg ├── facebook.svg ├── plugin.svg ├── save.svg ├── videocamera.svg ├── alert.svg ├── roundedrectangle_outline.svg ├── wifi.svg ├── checkmark.svg ├── comment.svg ├── computer.svg ├── home.svg ├── email.svg ├── flickr.svg ├── circle_outline.svg ├── rss.svg ├── expand.svg ├── cloud.svg ├── collapse.svg ├── listview.svg ├── bookmark.svg ├── delete.svg ├── tumblr.svg ├── brush.svg ├── location.svg ├── image.svg ├── favorite.svg ├── feedback.svg ├── refresh.svg ├── pencil.svg ├── image_outline.svg ├── camera.svg ├── user.svg ├── search.svg ├── view.svg ├── cancel.svg ├── call.svg ├── build.svg ├── unlock.svg ├── linkedin.svg ├── audio.svg ├── cart.svg ├── error.svg ├── print.svg ├── picasa.svg ├── instagram.svg ├── hipstamatic.svg ├── chat.svg ├── preview.svg ├── vimeo.svg ├── lock.svg ├── group.svg ├── attachment.svg ├── path.svg ├── calendar.svg ├── settings.svg ├── twitter.svg ├── tileview.svg ├── googleplus.svg ├── pinterest.svg ├── question.svg ├── dribble.svg ├── behance.svg ├── wordpress.svg ├── github_text.svg ├── w3c.svg └── github.svg ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /source/_Topcoat_IconSet_fw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/source/_Topcoat_IconSet_fw.png -------------------------------------------------------------------------------- /source/Topcoat_IconSetList.fw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/source/Topcoat_IconSetList.fw.png -------------------------------------------------------------------------------- /docs/_Topcoat_IconSet_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/docs/_Topcoat_IconSet_overview.png -------------------------------------------------------------------------------- /docs/_Topcoat_IconStyle_Guidelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/docs/_Topcoat_IconStyle_Guidelines.png -------------------------------------------------------------------------------- /source/_Topcoat_IconStyle_Guidelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/source/_Topcoat_IconStyle_Guidelines.png -------------------------------------------------------------------------------- /source/_TopCoat_IconSet_andSocialIcons.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/source/_TopCoat_IconSet_andSocialIcons.ai -------------------------------------------------------------------------------- /source/_Topcoat_IconStyle_Guidelines_fw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mibew/topcoat_icons/master/source/_Topcoat_IconStyle_Guidelines_fw.png -------------------------------------------------------------------------------- /font/icomatic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Icomatic'; 3 | src: url('icomatic.svg#icomatic') format('svg'); 4 | } 5 | .icomatic { 6 | font-family: 'Icomatic','sans-serif'; 7 | line-height: 1; 8 | text-rendering: optimizeLegibility; 9 | -webkit-font-feature-settings: "liga", "dlig"; 10 | -ms-font-feature-settings: "liga", "dlig"; 11 | -moz-font-feature-settings: "liga", "dlig"; 12 | -o-font-feature-settings: "liga", "dlig"; 13 | font-feature-settings: "liga", "dlig"; 14 | -webkit-font-smoothing: antialiased; 15 | } 16 | .icomatic-alt { 17 | margin: -1px; 18 | border:0; 19 | padding: 0; 20 | width: 1px; height: 1px; 21 | clip: rect(0 0 0 0); 22 | position: absolute; 23 | overflow: hidden; 24 | } -------------------------------------------------------------------------------- /svg/rectangle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/rectangle_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/back_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/next_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/arrow_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/arrow_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/arrow_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/roundedrectangle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /svg/folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/page.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/tablet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/like.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/phone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/retweet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/audiooff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /svg/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/facebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/plugin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/save.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/videocamera.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /svg/alert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/roundedrectangle_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /svg/wifi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/comment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/computer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/flickr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/circle_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/rss.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /svg/expand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/cloud.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/collapse.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/listview.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/bookmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/tumblr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /svg/brush.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/favorite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /svg/feedback.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/refresh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/pencil.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /svg/image_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/camera.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/view.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/call.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/build.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/unlock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/linkedin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /svg/audio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /svg/cart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/print.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /svg/picasa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /svg/instagram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /svg/hipstamatic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /svg/chat.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /svg/preview.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /svg/vimeo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /svg/lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 15 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /svg/group.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 19 | 20 | -------------------------------------------------------------------------------- /svg/attachment.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 19 | 20 | -------------------------------------------------------------------------------- /font/icomatic.js: -------------------------------------------------------------------------------- 1 | var IcomaticUtils = (function() { 2 | return { 3 | fallbacks: [{ from: 'laptop', 'to': '' },{ from: 'phone', 'to': '' }], 4 | substitute: function(el) { 5 | var curr = el.firstChild; 6 | var next, alt; 7 | var content; 8 | while (curr) { 9 | next = curr.nextSibling; 10 | if (curr.nodeType === Node.TEXT_NODE) { 11 | content = curr.nodeValue; 12 | for (var i = 0; i < IcomaticUtils.fallbacks.length; i++) { 13 | content = content.replace( IcomaticUtils.fallbacks[i].from, function(match) { 14 | alt = document.createElement('span'); 15 | alt.setAttribute('class', 'icomatic-alt'); 16 | alt.innerHTML = match; 17 | el.insertBefore(alt, curr); 18 | return IcomaticUtils.fallbacks[i].to; 19 | }); 20 | } 21 | alt = document.createTextNode(content); 22 | el.replaceChild(alt, curr); 23 | } 24 | curr = next; 25 | } 26 | }, 27 | run: function(force) { 28 | force = typeof force !== 'undefined' ? force : false; 29 | var s = getComputedStyle(document.body); 30 | if (s.hasOwnProperty('webkitFontFeatureSettings') 31 | || s.hasOwnProperty('mozFontFeatureSettings') 32 | || s.hasOwnProperty('msFontFeatureSettings') 33 | || s.hasOwnProperty('oFontFeatureSettings') 34 | || s.hasOwnProperty('fontFeatureSettings')) 35 | if (!force) 36 | return; 37 | var els = document.querySelectorAll('.icomatic'); 38 | for (var i = 0; i < els.length; i++) 39 | IcomaticUtils.substitute(els[i]); 40 | } 41 | } // end of object 42 | } // end of fn 43 | )() -------------------------------------------------------------------------------- /svg/path.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /svg/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 16 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /svg/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 21 | 22 | -------------------------------------------------------------------------------- /svg/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /svg/tileview.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 21 | 22 | -------------------------------------------------------------------------------- /svg/googleplus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TopCoat Icons 2 | ============ 3 | 4 | Open Source Icons designed for TopCoat 5 | 6 | 7 | 8 | 9 | 10 | common icons: 11 | (done: 13px,18px,24px,40px size) 12 | 13 | 1.share 14 | 2.user 15 | 3.favorite 16 | 4.attachment 17 | 5.checkmark 18 | 6.remove 19 | 7.add 20 | 8.cancel 21 | 9.lock 22 | 10.unlock 23 | 11.photo 24 | 12.image 25 | 13.back 26 | 14.next 27 | 15.settings 28 | 16.wifi 29 | 17.search 30 | 18.right arrow 31 | 19.left arrow 32 | 20.up arrow 33 | 21.down arrow 34 | 22.call 35 | 23.phone 36 | 24.tablet 37 | 25.laptop 38 | 26.location 39 | 27.expand 40 | 28.collapse 41 | 29.list view 42 | 30.tile view 43 | 31.text 44 | 32.home 45 | 33.brush 46 | 34.pencil 47 | 35.eye/visible 48 | 49 | 50 | 51 | to do: 52 | 35.eye/visible off 53 | 36.clock/time 54 | 37.video camera 55 | 38.alert 56 | 39.email 57 | 40.calendar 58 | 41.print 59 | 42.cart 60 | 43.save 61 | 44.cloud 62 | 45.page 63 | 46.user group 64 | 47.battery full 65 | 48.battery low 66 | 49.battery empty 67 | 50.bookmark 68 | 51.chat 69 | 52.upload 70 | 53.download 71 | 54.audio 72 | 55.audio off 73 | 56.comment/note 74 | 57.address book 75 | 58.map 76 | 59.credit card 77 | 60.news 78 | 61.graph 79 | 62.question mark 80 | 63.scissors 81 | 64.new 82 | 65.CC creative commons 83 | 66.video 84 | 67.retweet 85 | 68.refresh 86 | 69.error 87 | 70.delete 88 | 89 | social icons: 90 | (done: 40px size) 91 | 1.facebook 92 | 2.twitter 93 | 3.pinterest 94 | 4.github 95 | 5.dribble 96 | 6.behance 97 | 7.instagramm 98 | 8.linkedin 99 | 9.google-plus 100 | 10.youtube 101 | 11.vimeo 102 | 12.flickr 103 | 13.picasa 104 | 14.tumblr 105 | 15.wordpress 106 | 16.blogger 107 | 17.github-text 108 | 18.path 109 | 110 | to do: 111 | 19.css 112 | 20.stackoverflow 113 | 21.html 5 114 | 22.reddit 115 | 23.Skype 116 | 117 | 118 | -------------------------------------------------------------------------------- /svg/pinterest.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /font/icomatic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /svg/question.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 25 | 26 | -------------------------------------------------------------------------------- /svg/dribble.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /svg/behance.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 26 | 27 | -------------------------------------------------------------------------------- /svg/wordpress.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /svg/github_text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /svg/w3c.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 13 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /svg/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | ]> 9 | 12 | 31 | 32 | -------------------------------------------------------------------------------- /font/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 149 | 150 | 151 |

Ligature Icon Font

152 | Try typing one of your icon ligatures in the area below. 153 | eg laptop 154 |
155 |

Available Icons

156 | 169 |

Icon Font Usage

170 | Using an icon font is simple. Just include the stylesheet, and the icon class to any text you would like to be replaced with an icon. 171 |
172 | <link rel='stylesheet' type='text/css' href='icomatic.css'>
173 | <!-- Include the script for fallback support -->
174 | <script type='text/javascript' src='icomatic.js'></script>
175 | ...
176 | <span class='icomatic' style='color:blue'>laptop</span>
177 | 
178 | 179 | 180 | 181 | 182 | 183 | 206 | 207 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2 | 3 | Apache License 4 | Version 2.0, January 2004 5 | http://www.apache.org/licenses/ 6 | 7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8 | 9 | 1. Definitions. 10 | 11 | "License" shall mean the terms and conditions for use, reproduction, 12 | and distribution as defined by Sections 1 through 9 of this document. 13 | 14 | "Licensor" shall mean the copyright owner or entity authorized by 15 | the copyright owner that is granting the License. 16 | 17 | "Legal Entity" shall mean the union of the acting entity and all 18 | other entities that control, are controlled by, or are under common 19 | control with that entity. For the purposes of this definition, 20 | "control" means (i) the power, direct or indirect, to cause the 21 | direction or management of such entity, whether by contract or 22 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 23 | outstanding shares, or (iii) beneficial ownership of such entity. 24 | 25 | "You" (or "Your") shall mean an individual or Legal Entity 26 | exercising permissions granted by this License. 27 | 28 | "Source" form shall mean the preferred form for making modifications, 29 | including but not limited to software source code, documentation 30 | source, and configuration files. 31 | 32 | "Object" form shall mean any form resulting from mechanical 33 | transformation or translation of a Source form, including but 34 | not limited to compiled object code, generated documentation, 35 | and conversions to other media types. 36 | 37 | "Work" shall mean the work of authorship, whether in Source or 38 | Object form, made available under the License, as indicated by a 39 | copyright notice that is included in or attached to the work 40 | (an example is provided in the Appendix below). 41 | 42 | "Derivative Works" shall mean any work, whether in Source or Object 43 | form, that is based on (or derived from) the Work and for which the 44 | editorial revisions, annotations, elaborations, or other modifications 45 | represent, as a whole, an original work of authorship. For the purposes 46 | of this License, Derivative Works shall not include works that remain 47 | separable from, or merely link (or bind by name) to the interfaces of, 48 | the Work and Derivative Works thereof. 49 | 50 | "Contribution" shall mean any work of authorship, including 51 | the original version of the Work and any modifications or additions 52 | to that Work or Derivative Works thereof, that is intentionally 53 | submitted to Licensor for inclusion in the Work by the copyright owner 54 | or by an individual or Legal Entity authorized to submit on behalf of 55 | the copyright owner. For the purposes of this definition, "submitted" 56 | means any form of electronic, verbal, or written communication sent 57 | to the Licensor or its representatives, including but not limited to 58 | communication on electronic mailing lists, source code control systems, 59 | and issue tracking systems that are managed by, or on behalf of, the 60 | Licensor for the purpose of discussing and improving the Work, but 61 | excluding communication that is conspicuously marked or otherwise 62 | designated in writing by the copyright owner as "Not a Contribution." 63 | 64 | "Contributor" shall mean Licensor and any individual or Legal Entity 65 | on behalf of whom a Contribution has been received by Licensor and 66 | subsequently incorporated within the Work. 67 | 68 | 2. Grant of Copyright License. Subject to the terms and conditions of 69 | this License, each Contributor hereby grants to You a perpetual, 70 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 71 | copyright license to reproduce, prepare Derivative Works of, 72 | publicly display, publicly perform, sublicense, and distribute the 73 | Work and such Derivative Works in Source or Object form. 74 | 75 | 3. Grant of Patent License. Subject to the terms and conditions of 76 | this License, each Contributor hereby grants to You a perpetual, 77 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 78 | (except as stated in this section) patent license to make, have made, 79 | use, offer to sell, sell, import, and otherwise transfer the Work, 80 | where such license applies only to those patent claims licensable 81 | by such Contributor that are necessarily infringed by their 82 | Contribution(s) alone or by combination of their Contribution(s) 83 | with the Work to which such Contribution(s) was submitted. If You 84 | institute patent litigation against any entity (including a 85 | cross-claim or counterclaim in a lawsuit) alleging that the Work 86 | or a Contribution incorporated within the Work constitutes direct 87 | or contributory patent infringement, then any patent licenses 88 | granted to You under this License for that Work shall terminate 89 | as of the date such litigation is filed. 90 | 91 | 4. Redistribution. You may reproduce and distribute copies of the 92 | Work or Derivative Works thereof in any medium, with or without 93 | modifications, and in Source or Object form, provided that You 94 | meet the following conditions: 95 | 96 | (a) You must give any other recipients of the Work or 97 | Derivative Works a copy of this License; and 98 | 99 | (b) You must cause any modified files to carry prominent notices 100 | stating that You changed the files; and 101 | 102 | (c) You must retain, in the Source form of any Derivative Works 103 | that You distribute, all copyright, patent, trademark, and 104 | attribution notices from the Source form of the Work, 105 | excluding those notices that do not pertain to any part of 106 | the Derivative Works; and 107 | 108 | (d) If the Work includes a "NOTICE" text file as part of its 109 | distribution, then any Derivative Works that You distribute must 110 | include a readable copy of the attribution notices contained 111 | within such NOTICE file, excluding those notices that do not 112 | pertain to any part of the Derivative Works, in at least one 113 | of the following places: within a NOTICE text file distributed 114 | as part of the Derivative Works; within the Source form or 115 | documentation, if provided along with the Derivative Works; or, 116 | within a display generated by the Derivative Works, if and 117 | wherever such third-party notices normally appear. The contents 118 | of the NOTICE file are for informational purposes only and 119 | do not modify the License. You may add Your own attribution 120 | notices within Derivative Works that You distribute, alongside 121 | or as an addendum to the NOTICE text from the Work, provided 122 | that such additional attribution notices cannot be construed 123 | as modifying the License. 124 | 125 | You may add Your own copyright statement to Your modifications and 126 | may provide additional or different license terms and conditions 127 | for use, reproduction, or distribution of Your modifications, or 128 | for any such Derivative Works as a whole, provided Your use, 129 | reproduction, and distribution of the Work otherwise complies with 130 | the conditions stated in this License. 131 | 132 | 5. Submission of Contributions. Unless You explicitly state otherwise, 133 | any Contribution intentionally submitted for inclusion in the Work 134 | by You to the Licensor shall be under the terms and conditions of 135 | this License, without any additional terms or conditions. 136 | Notwithstanding the above, nothing herein shall supersede or modify 137 | the terms of any separate license agreement you may have executed 138 | with Licensor regarding such Contributions. 139 | 140 | 6. Trademarks. This License does not grant permission to use the trade 141 | names, trademarks, service marks, or product names of the Licensor, 142 | except as required for reasonable and customary use in describing the 143 | origin of the Work and reproducing the content of the NOTICE file. 144 | 145 | 7. Disclaimer of Warranty. Unless required by applicable law or 146 | agreed to in writing, Licensor provides the Work (and each 147 | Contributor provides its Contributions) on an "AS IS" BASIS, 148 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 149 | implied, including, without limitation, any warranties or conditions 150 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 151 | PARTICULAR PURPOSE. You are solely responsible for determining the 152 | appropriateness of using or redistributing the Work and assume any 153 | risks associated with Your exercise of permissions under this License. 154 | 155 | 8. Limitation of Liability. In no event and under no legal theory, 156 | whether in tort (including negligence), contract, or otherwise, 157 | unless required by applicable law (such as deliberate and grossly 158 | negligent acts) or agreed to in writing, shall any Contributor be 159 | liable to You for damages, including any direct, indirect, special, 160 | incidental, or consequential damages of any character arising as a 161 | result of this License or out of the use or inability to use the 162 | Work (including but not limited to damages for loss of goodwill, 163 | work stoppage, computer failure or malfunction, or any and all 164 | other commercial damages or losses), even if such Contributor 165 | has been advised of the possibility of such damages. 166 | 167 | 9. Accepting Warranty or Additional Liability. While redistributing 168 | the Work or Derivative Works thereof, You may choose to offer, 169 | and charge a fee for, acceptance of support, warranty, indemnity, 170 | or other liability obligations and/or rights consistent with this 171 | License. However, in accepting such obligations, You may act only 172 | on Your own behalf and on Your sole responsibility, not on behalf 173 | of any other Contributor, and only if You agree to indemnify, 174 | defend, and hold each Contributor harmless for any liability 175 | incurred by, or claims asserted against, such Contributor by reason 176 | of your accepting any such warranty or additional liability. 177 | 178 | END OF TERMS AND CONDITIONS 179 | 180 | APPENDIX: How to apply the Apache License to your work. 181 | 182 | To apply the Apache License to your work, attach the following 183 | boilerplate notice, with the fields enclosed by brackets "[]" 184 | replaced with your own identifying information. (Don't include 185 | the brackets!) The text should be enclosed in the appropriate 186 | comment syntax for the file format. We also recommend that a 187 | file or class name and description of purpose be included on the 188 | same "printed page" as the copyright notice for easier 189 | identification within third-party archives. 190 | 191 | Copyright [yyyy] [name of copyright owner] 192 | 193 | Licensed under the Apache License, Version 2.0 (the "License"); 194 | you may not use this file except in compliance with the License. 195 | You may obtain a copy of the License at 196 | 197 | http://www.apache.org/licenses/LICENSE-2.0 198 | 199 | Unless required by applicable law or agreed to in writing, software 200 | distributed under the License is distributed on an "AS IS" BASIS, 201 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 202 | See the License for the specific language governing permissions and 203 | limitations under the License. -------------------------------------------------------------------------------- /font/js/dat.color.js: -------------------------------------------------------------------------------- 1 | /** 2 | * dat-gui JavaScript Controller Library 3 | * http://code.google.com/p/dat-gui 4 | * 5 | * Copyright 2011 Data Arts Team, Google Creative Lab 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | */ 13 | 14 | /** @namespace */ 15 | var dat = dat || {}; 16 | 17 | /** @namespace */ 18 | dat.color = dat.color || {}; 19 | 20 | /** @namespace */ 21 | dat.utils = dat.utils || {}; 22 | 23 | dat.utils.common = (function () { 24 | 25 | var ARR_EACH = Array.prototype.forEach; 26 | var ARR_SLICE = Array.prototype.slice; 27 | 28 | /** 29 | * Band-aid methods for things that should be a lot easier in JavaScript. 30 | * Implementation and structure inspired by underscore.js 31 | * http://documentcloud.github.com/underscore/ 32 | */ 33 | 34 | return { 35 | 36 | BREAK: {}, 37 | 38 | extend: function(target) { 39 | 40 | this.each(ARR_SLICE.call(arguments, 1), function(obj) { 41 | 42 | for (var key in obj) 43 | if (!this.isUndefined(obj[key])) 44 | target[key] = obj[key]; 45 | 46 | }, this); 47 | 48 | return target; 49 | 50 | }, 51 | 52 | defaults: function(target) { 53 | 54 | this.each(ARR_SLICE.call(arguments, 1), function(obj) { 55 | 56 | for (var key in obj) 57 | if (this.isUndefined(target[key])) 58 | target[key] = obj[key]; 59 | 60 | }, this); 61 | 62 | return target; 63 | 64 | }, 65 | 66 | compose: function() { 67 | var toCall = ARR_SLICE.call(arguments); 68 | return function() { 69 | var args = ARR_SLICE.call(arguments); 70 | for (var i = toCall.length -1; i >= 0; i--) { 71 | args = [toCall[i].apply(this, args)]; 72 | } 73 | return args[0]; 74 | } 75 | }, 76 | 77 | each: function(obj, itr, scope) { 78 | 79 | 80 | if (ARR_EACH && obj.forEach === ARR_EACH) { 81 | 82 | obj.forEach(itr, scope); 83 | 84 | } else if (obj.length === obj.length + 0) { // Is number but not NaN 85 | 86 | for (var key = 0, l = obj.length; key < l; key++) 87 | if (key in obj && itr.call(scope, obj[key], key) === this.BREAK) 88 | return; 89 | 90 | } else { 91 | 92 | for (var key in obj) 93 | if (itr.call(scope, obj[key], key) === this.BREAK) 94 | return; 95 | 96 | } 97 | 98 | }, 99 | 100 | defer: function(fnc) { 101 | setTimeout(fnc, 0); 102 | }, 103 | 104 | toArray: function(obj) { 105 | if (obj.toArray) return obj.toArray(); 106 | return ARR_SLICE.call(obj); 107 | }, 108 | 109 | isUndefined: function(obj) { 110 | return obj === undefined; 111 | }, 112 | 113 | isNull: function(obj) { 114 | return obj === null; 115 | }, 116 | 117 | isNaN: function(obj) { 118 | return obj !== obj; 119 | }, 120 | 121 | isArray: Array.isArray || function(obj) { 122 | return obj.constructor === Array; 123 | }, 124 | 125 | isObject: function(obj) { 126 | return obj === Object(obj); 127 | }, 128 | 129 | isNumber: function(obj) { 130 | return obj === obj+0; 131 | }, 132 | 133 | isString: function(obj) { 134 | return obj === obj+''; 135 | }, 136 | 137 | isBoolean: function(obj) { 138 | return obj === false || obj === true; 139 | }, 140 | 141 | isFunction: function(obj) { 142 | return Object.prototype.toString.call(obj) === '[object Function]'; 143 | } 144 | 145 | }; 146 | 147 | })(); 148 | 149 | 150 | dat.color.toString = (function (common) { 151 | 152 | return function(color) { 153 | 154 | if (color.a == 1 || common.isUndefined(color.a)) { 155 | 156 | var s = color.hex.toString(16); 157 | while (s.length < 6) { 158 | s = '0' + s; 159 | } 160 | 161 | return '#' + s; 162 | 163 | } else { 164 | 165 | return 'rgba(' + Math.round(color.r) + ',' + Math.round(color.g) + ',' + Math.round(color.b) + ',' + color.a + ')'; 166 | 167 | } 168 | 169 | } 170 | 171 | })(dat.utils.common); 172 | 173 | 174 | dat.Color = dat.color.Color = (function (interpret, math, toString, common) { 175 | 176 | var Color = function() { 177 | 178 | this.__state = interpret.apply(this, arguments); 179 | 180 | if (this.__state === false) { 181 | throw 'Failed to interpret color arguments'; 182 | } 183 | 184 | this.__state.a = this.__state.a || 1; 185 | 186 | 187 | }; 188 | 189 | Color.COMPONENTS = ['r','g','b','h','s','v','hex','a']; 190 | 191 | common.extend(Color.prototype, { 192 | 193 | toString: function() { 194 | return toString(this); 195 | }, 196 | 197 | toOriginal: function() { 198 | return this.__state.conversion.write(this); 199 | } 200 | 201 | }); 202 | 203 | defineRGBComponent(Color.prototype, 'r', 2); 204 | defineRGBComponent(Color.prototype, 'g', 1); 205 | defineRGBComponent(Color.prototype, 'b', 0); 206 | 207 | defineHSVComponent(Color.prototype, 'h'); 208 | defineHSVComponent(Color.prototype, 's'); 209 | defineHSVComponent(Color.prototype, 'v'); 210 | 211 | Object.defineProperty(Color.prototype, 'a', { 212 | 213 | get: function() { 214 | return this.__state.a; 215 | }, 216 | 217 | set: function(v) { 218 | this.__state.a = v; 219 | } 220 | 221 | }); 222 | 223 | Object.defineProperty(Color.prototype, 'hex', { 224 | 225 | get: function() { 226 | 227 | if (!this.__state.space !== 'HEX') { 228 | this.__state.hex = math.rgb_to_hex(this.r, this.g, this.b); 229 | } 230 | 231 | return this.__state.hex; 232 | 233 | }, 234 | 235 | set: function(v) { 236 | 237 | this.__state.space = 'HEX'; 238 | this.__state.hex = v; 239 | 240 | } 241 | 242 | }); 243 | 244 | function defineRGBComponent(target, component, componentHexIndex) { 245 | 246 | Object.defineProperty(target, component, { 247 | 248 | get: function() { 249 | 250 | if (this.__state.space === 'RGB') { 251 | return this.__state[component]; 252 | } 253 | 254 | recalculateRGB(this, component, componentHexIndex); 255 | 256 | return this.__state[component]; 257 | 258 | }, 259 | 260 | set: function(v) { 261 | 262 | if (this.__state.space !== 'RGB') { 263 | recalculateRGB(this, component, componentHexIndex); 264 | this.__state.space = 'RGB'; 265 | } 266 | 267 | this.__state[component] = v; 268 | 269 | } 270 | 271 | }); 272 | 273 | } 274 | 275 | function defineHSVComponent(target, component) { 276 | 277 | Object.defineProperty(target, component, { 278 | 279 | get: function() { 280 | 281 | if (this.__state.space === 'HSV') 282 | return this.__state[component]; 283 | 284 | recalculateHSV(this); 285 | 286 | return this.__state[component]; 287 | 288 | }, 289 | 290 | set: function(v) { 291 | 292 | if (this.__state.space !== 'HSV') { 293 | recalculateHSV(this); 294 | this.__state.space = 'HSV'; 295 | } 296 | 297 | this.__state[component] = v; 298 | 299 | } 300 | 301 | }); 302 | 303 | } 304 | 305 | function recalculateRGB(color, component, componentHexIndex) { 306 | 307 | if (color.__state.space === 'HEX') { 308 | 309 | color.__state[component] = math.component_from_hex(color.__state.hex, componentHexIndex); 310 | 311 | } else if (color.__state.space === 'HSV') { 312 | 313 | common.extend(color.__state, math.hsv_to_rgb(color.__state.h, color.__state.s, color.__state.v)); 314 | 315 | } else { 316 | 317 | throw 'Corrupted color state'; 318 | 319 | } 320 | 321 | } 322 | 323 | function recalculateHSV(color) { 324 | 325 | var result = math.rgb_to_hsv(color.r, color.g, color.b); 326 | 327 | common.extend(color.__state, 328 | { 329 | s: result.s, 330 | v: result.v 331 | } 332 | ); 333 | 334 | if (!common.isNaN(result.h)) { 335 | color.__state.h = result.h; 336 | } else if (common.isUndefined(color.__state.h)) { 337 | color.__state.h = 0; 338 | } 339 | 340 | } 341 | 342 | return Color; 343 | 344 | })(dat.color.interpret = (function (toString, common) { 345 | 346 | var result, toReturn; 347 | 348 | var interpret = function() { 349 | 350 | toReturn = false; 351 | 352 | var original = arguments.length > 1 ? common.toArray(arguments) : arguments[0]; 353 | 354 | common.each(INTERPRETATIONS, function(family) { 355 | 356 | if (family.litmus(original)) { 357 | 358 | common.each(family.conversions, function(conversion, conversionName) { 359 | 360 | result = conversion.read(original); 361 | 362 | if (toReturn === false && result !== false) { 363 | toReturn = result; 364 | result.conversionName = conversionName; 365 | result.conversion = conversion; 366 | return common.BREAK; 367 | 368 | } 369 | 370 | }); 371 | 372 | return common.BREAK; 373 | 374 | } 375 | 376 | }); 377 | 378 | return toReturn; 379 | 380 | }; 381 | 382 | var INTERPRETATIONS = [ 383 | 384 | // Strings 385 | { 386 | 387 | litmus: common.isString, 388 | 389 | conversions: { 390 | 391 | THREE_CHAR_HEX: { 392 | 393 | read: function(original) { 394 | 395 | var test = original.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i); 396 | if (test === null) return false; 397 | 398 | return { 399 | space: 'HEX', 400 | hex: parseInt( 401 | '0x' + 402 | test[1].toString() + test[1].toString() + 403 | test[2].toString() + test[2].toString() + 404 | test[3].toString() + test[3].toString()) 405 | }; 406 | 407 | }, 408 | 409 | write: toString 410 | 411 | }, 412 | 413 | SIX_CHAR_HEX: { 414 | 415 | read: function(original) { 416 | 417 | var test = original.match(/^#([A-F0-9]{6})$/i); 418 | if (test === null) return false; 419 | 420 | return { 421 | space: 'HEX', 422 | hex: parseInt('0x' + test[1].toString()) 423 | }; 424 | 425 | }, 426 | 427 | write: toString 428 | 429 | }, 430 | 431 | CSS_RGB: { 432 | 433 | read: function(original) { 434 | 435 | var test = original.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/); 436 | if (test === null) return false; 437 | 438 | return { 439 | space: 'RGB', 440 | r: parseFloat(test[1]), 441 | g: parseFloat(test[2]), 442 | b: parseFloat(test[3]) 443 | }; 444 | 445 | }, 446 | 447 | write: toString 448 | 449 | }, 450 | 451 | CSS_RGBA: { 452 | 453 | read: function(original) { 454 | 455 | var test = original.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/); 456 | if (test === null) return false; 457 | 458 | return { 459 | space: 'RGB', 460 | r: parseFloat(test[1]), 461 | g: parseFloat(test[2]), 462 | b: parseFloat(test[3]), 463 | a: parseFloat(test[4]) 464 | }; 465 | 466 | }, 467 | 468 | write: toString 469 | 470 | } 471 | 472 | } 473 | 474 | }, 475 | 476 | // Numbers 477 | { 478 | 479 | litmus: common.isNumber, 480 | 481 | conversions: { 482 | 483 | HEX: { 484 | read: function(original) { 485 | return { 486 | space: 'HEX', 487 | hex: original, 488 | conversionName: 'HEX' 489 | } 490 | }, 491 | 492 | write: function(color) { 493 | return color.hex; 494 | } 495 | } 496 | 497 | } 498 | 499 | }, 500 | 501 | // Arrays 502 | { 503 | 504 | litmus: common.isArray, 505 | 506 | conversions: { 507 | 508 | RGB_ARRAY: { 509 | read: function(original) { 510 | if (original.length != 3) return false; 511 | return { 512 | space: 'RGB', 513 | r: original[0], 514 | g: original[1], 515 | b: original[2] 516 | }; 517 | }, 518 | 519 | write: function(color) { 520 | return [color.r, color.g, color.b]; 521 | } 522 | 523 | }, 524 | 525 | RGBA_ARRAY: { 526 | read: function(original) { 527 | if (original.length != 4) return false; 528 | return { 529 | space: 'RGB', 530 | r: original[0], 531 | g: original[1], 532 | b: original[2], 533 | a: original[3] 534 | }; 535 | }, 536 | 537 | write: function(color) { 538 | return [color.r, color.g, color.b, color.a]; 539 | } 540 | 541 | } 542 | 543 | } 544 | 545 | }, 546 | 547 | // Objects 548 | { 549 | 550 | litmus: common.isObject, 551 | 552 | conversions: { 553 | 554 | RGBA_OBJ: { 555 | read: function(original) { 556 | if (common.isNumber(original.r) && 557 | common.isNumber(original.g) && 558 | common.isNumber(original.b) && 559 | common.isNumber(original.a)) { 560 | return { 561 | space: 'RGB', 562 | r: original.r, 563 | g: original.g, 564 | b: original.b, 565 | a: original.a 566 | } 567 | } 568 | return false; 569 | }, 570 | 571 | write: function(color) { 572 | return { 573 | r: color.r, 574 | g: color.g, 575 | b: color.b, 576 | a: color.a 577 | } 578 | } 579 | }, 580 | 581 | RGB_OBJ: { 582 | read: function(original) { 583 | if (common.isNumber(original.r) && 584 | common.isNumber(original.g) && 585 | common.isNumber(original.b)) { 586 | return { 587 | space: 'RGB', 588 | r: original.r, 589 | g: original.g, 590 | b: original.b 591 | } 592 | } 593 | return false; 594 | }, 595 | 596 | write: function(color) { 597 | return { 598 | r: color.r, 599 | g: color.g, 600 | b: color.b 601 | } 602 | } 603 | }, 604 | 605 | HSVA_OBJ: { 606 | read: function(original) { 607 | if (common.isNumber(original.h) && 608 | common.isNumber(original.s) && 609 | common.isNumber(original.v) && 610 | common.isNumber(original.a)) { 611 | return { 612 | space: 'HSV', 613 | h: original.h, 614 | s: original.s, 615 | v: original.v, 616 | a: original.a 617 | } 618 | } 619 | return false; 620 | }, 621 | 622 | write: function(color) { 623 | return { 624 | h: color.h, 625 | s: color.s, 626 | v: color.v, 627 | a: color.a 628 | } 629 | } 630 | }, 631 | 632 | HSV_OBJ: { 633 | read: function(original) { 634 | if (common.isNumber(original.h) && 635 | common.isNumber(original.s) && 636 | common.isNumber(original.v)) { 637 | return { 638 | space: 'HSV', 639 | h: original.h, 640 | s: original.s, 641 | v: original.v 642 | } 643 | } 644 | return false; 645 | }, 646 | 647 | write: function(color) { 648 | return { 649 | h: color.h, 650 | s: color.s, 651 | v: color.v 652 | } 653 | } 654 | 655 | } 656 | 657 | } 658 | 659 | } 660 | 661 | 662 | ]; 663 | 664 | return interpret; 665 | 666 | 667 | })(dat.color.toString, 668 | dat.utils.common), 669 | dat.color.math = (function () { 670 | 671 | var tmpComponent; 672 | 673 | return { 674 | 675 | hsv_to_rgb: function(h, s, v) { 676 | 677 | var hi = Math.floor(h / 60) % 6; 678 | 679 | var f = h / 60 - Math.floor(h / 60); 680 | var p = v * (1.0 - s); 681 | var q = v * (1.0 - (f * s)); 682 | var t = v * (1.0 - ((1.0 - f) * s)); 683 | var c = [ 684 | [v, t, p], 685 | [q, v, p], 686 | [p, v, t], 687 | [p, q, v], 688 | [t, p, v], 689 | [v, p, q] 690 | ][hi]; 691 | 692 | return { 693 | r: c[0] * 255, 694 | g: c[1] * 255, 695 | b: c[2] * 255 696 | }; 697 | 698 | }, 699 | 700 | rgb_to_hsv: function(r, g, b) { 701 | 702 | var min = Math.min(r, g, b), 703 | max = Math.max(r, g, b), 704 | delta = max - min, 705 | h, s; 706 | 707 | if (max != 0) { 708 | s = delta / max; 709 | } else { 710 | return { 711 | h: NaN, 712 | s: 0, 713 | v: 0 714 | }; 715 | } 716 | 717 | if (r == max) { 718 | h = (g - b) / delta; 719 | } else if (g == max) { 720 | h = 2 + (b - r) / delta; 721 | } else { 722 | h = 4 + (r - g) / delta; 723 | } 724 | h /= 6; 725 | if (h < 0) { 726 | h += 1; 727 | } 728 | 729 | return { 730 | h: h * 360, 731 | s: s, 732 | v: max / 255 733 | }; 734 | }, 735 | 736 | rgb_to_hex: function(r, g, b) { 737 | var hex = this.hex_with_component(0, 2, r); 738 | hex = this.hex_with_component(hex, 1, g); 739 | hex = this.hex_with_component(hex, 0, b); 740 | return hex; 741 | }, 742 | 743 | component_from_hex: function(hex, componentIndex) { 744 | return (hex >> (componentIndex * 8)) & 0xFF; 745 | }, 746 | 747 | hex_with_component: function(hex, componentIndex, value) { 748 | return value << (tmpComponent = componentIndex * 8) | (hex & ~ (0xFF << tmpComponent)); 749 | } 750 | 751 | } 752 | 753 | })(), 754 | dat.color.toString, 755 | dat.utils.common); --------------------------------------------------------------------------------