Solve in Python:
```if:java
___Note for Java users:___ Due to type checking in Java, inputs and outputs are formated quite differently in this language. See the footnotes of the description.


```

You have the following lattice points with their corresponding coordinates and each one with an specific colour.

 ```
Point   [x ,  y]     Colour
----------------------------
  A     [ 3,  4]     Blue
  B     [-7, -1]     Red
  C     [ 7, -6]     Yellow
  D     [ 2,  5]     Yellow
  E     [ 1, -5]     Red
  F     [-1,  4]     Red
  G     [ 1,  7]     Red
  H     [-3,  5]     Red
  I     [-3, -5]     Blue
  J     [ 4,  1]     Blue
```
We want to count the triangles that have the three vertices with the same colour. The following picture shows the distribution of the points in the plane with the required triangles.

![source: imgur.com](http://i.imgur.com/sP0l1i1.png)

The input that we will have for the field of lattice points described above is:

```
[[[3, -4], "blue"],  [[-7, -1], "red"], [[7, -6], "yellow"], [[2, 5], "yellow"],
 [[1, -5], "red"],   [[-1, 4], "red"],  [[1, 7], "red"],     [[-3, 5], "red"], 
 [[-3, -5], "blue"], [[4, 1], "blue"] ]
```
We see the following result from it:

```
Colour   Amount of Triangles       Triangles
Yellow         0                    -------
Blue           1                      AIJ
Red            10                   BEF,BEG,BEH,BFG,BFH,BGH,EFG,EFH,EHG,FGH
```
As we have 5 different points in red and each combination of 3 points that are not aligned.

We need a code that may give us the following information in order:

```
1) Total given points
2) Total number of colours
3) Total number of possible triangles
4) and 5) The colour (or colours, sorted alphabetically) with the highest amount of triangles
```

In Python our function will work like:

```
[10, 3, 11, ["red",10]]) == count_col_triang([[[3, -4], "blue"],  [[-7, -1], "red"], [[7, -6], "yellow"], [[2, 5], "yellow"], 
                                              [[1, -5], "red"],   [[-1, 4], "red"],  [[1, 7], "red"],     [[-3, 5],...
from collections import defaultdict
from itertools import combinations


def count_col_triang(points_colors):
    point_count = len(points_colors)

    colors = set(color for points, color in points_colors)
    color_count = len(colors)

    color_points = defaultdict(lambda: False)

    for c in colors:
        color_points[c] = [points
                           for points, color in points_colors if color == c]

    # get all with 3 or more points, kasi 3 points min sa triangle
    color_points = defaultdict(lambda: False, ((color, points)
                                               for color, points in color_points.items() if len(points) >= 3))

    triangle_count = 0
    color_triangle_count = defaultdict(lambda: False)

    for color, points in color_points.items():
        comb_points = combinations(points, 3)
        color_triangle_count[color] = 0
        x, y = 0, 1

        # get the side lengths and compute area
        for vertices in comb_points:
            va, vb, vc = vertices
            # get sides using distance between 2 points formula
            a = (((vb[x] - va[x])**2) + (vb[y] - va[y])**2)**0.5
            b = (((vc[x] - vb[x])**2) + (vc[y] - vb[y])**2)**0.5
            c = (((va[x] - vc[x])**2) + (va[y] - vc[y])**2)**0.5
            s = (a + b + c) / 2  # semi-perimeter
            area = (s*(s-a)*(s-b)*(s-c))**0.5

            # any 3 points with an area is a triangle
            if area != 0:
                triangle_count += 1
                color_triangle_count[color] += 1

    max_count = max(color_triangle_count.values())

    # get all colors with highest triangle count, append sa dulo count for format
    colors_max_count = sorted([color for color, count in color_triangle_count.items()
                               if count == max_count])
    colors_max_count.append(max_count)

    if max_count <= 0:
        colors_max_count = []

    return [point_count, color_count, triangle_count, colors_max_count]