rgbify 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/rgbify.rb +13 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c58cb564904858fb33fd281f298122a9fa6aea0c
4
+ data.tar.gz: 74f8716d2a0e00defb3ca7ca01fceeb3cb23760e
5
+ SHA512:
6
+ metadata.gz: a79c76efec2eb95c6e9af08702693bb27eb19db8077f9b252f5952085b9ef006ad700c796d4fa1357ba7864d752a92a806768740bbf9e301dcbeddfad2426897
7
+ data.tar.gz: ac4426c01c82c6ff45b9d3a55799b9466bf76287055980fe1c0216a0672e7a8cbc11b91486c4a7c911448e22bae54cdc3a277ce24df6d9d711ed94e6efa82b12
data/lib/rgbify.rb ADDED
@@ -0,0 +1,13 @@
1
+ def rgbify(hex)
2
+ if hex.length == 7
3
+ x = hex[1..-1]
4
+ array = []
5
+ x = x.scan(/.{2}/)
6
+ x.each do |y|
7
+ array << y.hex
8
+ end
9
+ else
10
+ raise "Please Input valid Hexcode: #ffffff"
11
+ end
12
+ return array
13
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rgbify
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nicholas Ong
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-04-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple gem to convert hexcode to rgb
14
+ email: nicholasowh@hotmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/rgbify.rb
20
+ homepage: http://rubygems.org/gems/rgbify
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.5.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: rgbify hexcode
44
+ test_files: []