Question: I am reading a text from a website in order to compare it with the string 'test'. It should fail, however, it passes. Why?

See the piece of code below:

```
expect(el.get(i).getText()).to.be.eventually.equal('test');

```

where element el is:

```
var el=$$('*[class="panel-body"] p');

```

The definition of expect is:

```
global.expect = require('chai').expect;

```

What am I doing wrong?

Answer: 
It was a pretty simple issue; you gave a larger color before a smaller one to `cv.inRange`, so there was no valid intersection! Here's some working code that shows the output. This should be easy to adapt into your own script.

```
import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt

img = cv.imread('shuttle.jpg')   # you can read in images with opencv
img_hsv = cv.cvtColor(img, cv.COLOR_BGR2HSV)

hsv_color1 = np.asarray([0, 0, 255])   # white!
hsv_color2 = np.asarray([30, 255, 255])   # yellow! note the order

mask = cv.inRange(img_hsv, hsv_color1, hsv_color2)

plt.imshow(mask, cmap='gray')   # this colormap will display in black / white
plt.show()

```

[![enter image description here](https://i.stack.imgur.com/bYFKy.png)](https://i.stack.imgur.com/bYFKy.png)
you can download colorgram module from pypi in this method you can extract as many colors you want from one picture

note : your image name should be in the same file of your main , that you can see here in my code (turtle.jpg) otherwise you can give the colorgram the number of colors that you want to be extracted : as in my case (30)

```
import colorgram
from extraction import Extraction
colors = colorgram.extract('turtle.jpg',30)
# print(colors)
list = []
for color in colors:
    # print(color)
    r = color.rgb.r
    g = color.rgb.g
    b = color.rgb.b
    new_color = (r,g,b)
    list.append(new_color)
print(list

```